{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import statsmodels.formula.api as smf\n",
    "from statsmodels.formula.api import ols\n",
    "#from regressors import stats\n",
    "from statsmodels.stats.outliers_influence import variance_inflation_factor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "         date           GDP         y        x1        x2   x2_diff  x2_diff2  \\\n0  2014-03-01   8173.549149  9.008659  6.266041  7.826730  0.003800  0.120600   \n1  2014-06-01   9809.436579  9.191100  6.513495  8.049318  0.222588  0.218788   \n2  2014-09-01   9980.577105  9.208396  6.553665  8.056709  0.007390 -0.215198   \n3  2014-12-01  12059.917551  9.397643  6.543770  8.066490  0.009781  0.002391   \n4  2015-03-01   9221.739669  9.129319  6.267120  7.838667 -0.227823 -0.237605   \n5  2015-06-01  10354.088209  9.245137  6.534001  8.007017  0.168351  0.396174   \n6  2015-09-01  10161.038862  9.226316  6.526775  8.012157  0.005140 -0.163211   \n7  2015-12-01  13770.853260  9.530310  6.530887  8.036984  0.024827  0.019687   \n8  2016-03-01   9862.022036  9.196447  6.310605  7.834915 -0.202069 -0.226896   \n9  2016-06-01  11269.368323  9.329844  6.569595  8.020708  0.185793  0.387862   \n10 2016-09-01  10998.155661  9.305483  6.585332  8.022890  0.002183 -0.183610   \n11 2016-12-01  15124.493979  9.624071  6.650938  8.069151  0.046261  0.044078   \n12 2017-03-01  11260.527043  9.329059  6.403112  7.924040 -0.145112 -0.191373   \n13 2017-06-01  12820.923272  9.458834  6.628625  8.130162  0.206122  0.351234   \n14 2017-09-01  12576.905083  9.439617  6.719548  8.110193 -0.019969 -0.226092   \n15 2017-12-01  15744.774602  9.664264  6.681085  8.063217 -0.046976 -0.027006   \n16 2018-03-01  12500.904859  9.433556  6.454557  7.815691 -0.247526 -0.200550   \n17 2018-06-01  14024.959955  9.548594  6.722089  7.966795  0.151104  0.398630   \n18 2018-09-01  14797.511808  9.602214  6.780542  8.057377  0.090583 -0.060521   \n19 2018-12-01  16679.463378  9.721934  6.721266  8.052105 -0.005272 -0.095855   \n20 2019-03-01  13746.208200  9.528518  6.478617  7.895250 -0.156856 -0.151584   \n21 2019-06-01  15291.328500  9.635041  6.710568  8.026824  0.131574  0.288429   \n22 2019-09-01  15898.690600  9.673992  6.792549  8.049108  0.022284 -0.109290   \n23 2019-12-01  17525.759000  9.771427  6.780160  8.034048 -0.015060 -0.037344   \n24 2020-03-01  13118.619000  9.481788  6.261448  7.743447 -0.290600 -0.275540   \n25 2020-06-01  15924.495500  9.675614  6.771893  7.977153  0.233706  0.524306   \n26 2020-09-01  16666.081900  9.721131  6.856591  8.107328  0.130175 -0.103531   \n27 2020-12-01  18979.867289  9.851134  6.859935  8.186771  0.079442 -0.050733   \n28 2021-03-01  16273.314400  9.697282  6.660558  8.075925 -0.110846 -0.190288   \n29 2021-06-01  18137.491900  9.805736  6.890753  8.235599  0.159674  0.270520   \n30 2021-09-01  18238.748600  9.811304  6.956559  8.277158  0.041559 -0.118116   \n31 2021-12-01  20866.202800  9.945886  6.860005  8.378069  0.100911  0.059353   \n32 2022-03-01  17886.386900  9.791795  6.719769  8.307953 -0.070117 -0.171028   \n\n          x3       x41        x42  ...  x167_diff       x18       x19  \\\n0   8.442704  8.103404  10.387952  ...  -0.009671  5.390033  7.889545   \n1   8.650919  8.436791  10.209559  ...  -0.042429  5.394162  8.046895   \n2   8.695230  8.430949  10.432081  ...   0.024460  5.426798  8.081899   \n3   8.609951  8.356033  10.457456  ...   0.059248  5.458402  8.164684   \n4   8.471102  8.228746  10.216362  ...  -0.024218  5.489038  7.897363   \n5   8.579945  8.530081  10.447552  ...  -0.059958  5.518763  8.143340   \n6   8.666237  8.507559  10.442440  ...   0.023584  5.547630  8.102465   \n7   8.641887  8.383327  10.518627  ...   0.053201  5.575687  8.232222   \n8   8.425789  8.461419  10.197466  ...  -0.018444  5.602978  7.968240   \n9   8.647810  8.572557  10.548468  ...  -0.049697  5.629544  8.197255   \n10  8.691009  8.658620  10.483231  ...   0.026264  5.657070  8.166745   \n11  8.698181  8.580334  10.636735  ...   0.049818  5.685460  8.286073   \n12  8.629011  8.577826  10.352651  ...  -0.012462  5.713065  8.030145   \n13  8.802603  8.690898  10.685090  ...  -0.036940  5.739930  8.252161   \n14  8.781592  8.750994  10.648255  ...   0.028878  5.770498  8.229591   \n15  8.831691  8.666386  10.665775  ...   0.044971  5.804419  8.331695   \n16  8.734118  8.651823  10.466293  ...  -0.019966  5.837227  8.089194   \n17  8.870484  8.777244  10.718629  ...  -0.037061  5.868993  8.309841   \n18  8.958564  8.839240  10.731633  ...   0.023140  5.905246  8.276681   \n19  8.911270  8.740820  10.771663  ...   0.019946  5.945481  8.358024   \n20  8.800214  8.737684  10.523674  ...  -0.024838  5.984159  8.154385   \n21  8.916509  8.886566  10.776203  ...  -0.052819  6.021397  8.296108   \n22  9.028938  8.948516  10.792899  ...  -0.016012  6.052049  8.320796   \n23  9.036131  8.831396  10.844187  ...   0.016951  6.076667  8.421019   \n24  8.747717  8.069321  10.316623  ...  -0.063459  6.100694  8.063803   \n25  9.040323  8.377218  10.833200  ...  -0.059554  6.124157  8.376650   \n26  9.179623  8.719646  10.917506  ...   0.042132  6.153309  8.391258   \n27  9.149858  8.722346  10.958312  ...   0.038960  6.187652  8.523269   \n28  9.061086  8.468740  10.632316  ...  -0.008099  6.220854  8.388785   \n29  9.265841  8.854006  10.961106  ...  -0.013044  6.252989  8.551038   \n30  9.282531  8.704541  10.992627  ...   0.027543  6.285659  8.547552   \n31  9.347508  8.480760  10.961281  ...   0.027326  6.318780  8.644478   \n32  9.283219  8.268384  10.698489  ...  -0.007372  6.350839  8.578260   \n\n          x20  x20_diff       x21       x22       x23        x24  x24_diff  \n0    9.490387       NaN       NaN       NaN  6.665913   9.066736       NaN  \n1    9.708583  0.218197       NaN       NaN  6.835378   9.182548  0.115812  \n2    9.722591  0.014007       NaN       NaN  7.107163   9.247077  0.064530  \n3    9.798750  0.076159       NaN       NaN  7.462094   9.315457  0.068380  \n4    9.510760 -0.287990       NaN       NaN  6.805357   9.108839 -0.206618  \n5    9.716409  0.205649       NaN       NaN  7.416547   9.278149  0.169309  \n6    9.695342 -0.021067       NaN       NaN  7.335451   9.276381 -0.001768  \n7    9.809727  0.114386       NaN       NaN  7.542017   9.339903  0.063522  \n8    9.537685 -0.272043       NaN       NaN  7.300041   9.143335 -0.196568  \n9    9.752299  0.214615       NaN       NaN  7.769953   9.324704  0.181369  \n10   9.737975 -0.014325       NaN       NaN  7.759222   9.336286  0.011581  \n11   9.863012  0.125038       NaN       NaN  7.801792   9.522549  0.186264  \n12   9.613852 -0.249161  7.885946  7.803159  7.521296   9.363345 -0.159205  \n13   9.789056  0.175204  8.065793  8.065802  7.939562   9.519962  0.156618  \n14   9.778969 -0.010087  8.092857  8.050795  7.727623   9.552717  0.032754  \n15   9.891021  0.112052  8.336537  8.087275  7.892224   9.510778 -0.041938  \n16   9.657499 -0.233523  8.105646  7.719520  7.532666   9.518847  0.008068  \n17   9.814157  0.156659  8.222285  7.893353  8.045229   9.669763  0.150917  \n18   9.811521 -0.002636  8.160084  8.023069  7.706968   9.686991  0.017227  \n19   9.903152  0.091630  8.414243  8.111863  7.841788   9.741804  0.054813  \n20   9.675966 -0.227186  8.247914  7.836903  7.388989   9.702099 -0.039704  \n21   9.769750  0.093785  8.340358  8.101902  7.960844   9.814525  0.112426  \n22   9.806156  0.036405  8.339365  8.205513  7.765238   9.364262 -0.450263  \n23   9.894765  0.088609  8.714331  8.340391  7.838552  10.209497  0.845234  \n24   9.481710 -0.413054  8.308963  7.761259  7.205412   9.602376 -0.607121  \n25   9.841165  0.359455  8.531676  8.234806  8.071109   9.984740  0.382365  \n26   9.890580  0.049414  8.606465  8.187835  7.874804  10.040271  0.055531  \n27  10.015731  0.125151  8.858408  8.465818  8.030338  10.159141  0.118870  \n28   9.858825 -0.156906  8.651983  8.107396  7.863621  10.073365 -0.085776  \n29  10.051520  0.192695  8.772798  8.342526  8.158456  10.298673  0.225308  \n30  10.060004  0.008484  8.795129  8.321944  7.617351  10.252133 -0.046540  \n31  10.153752  0.093748  9.005747  8.465016  7.530357  10.330381  0.078248  \n32  10.037280 -0.116472  8.783024  8.228220  7.394462   7.859645 -2.470736  \n\n[33 rows x 45 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>date</th>\n      <th>GDP</th>\n      <th>y</th>\n      <th>x1</th>\n      <th>x2</th>\n      <th>x2_diff</th>\n      <th>x2_diff2</th>\n      <th>x3</th>\n      <th>x41</th>\n      <th>x42</th>\n      <th>...</th>\n      <th>x167_diff</th>\n      <th>x18</th>\n      <th>x19</th>\n      <th>x20</th>\n      <th>x20_diff</th>\n      <th>x21</th>\n      <th>x22</th>\n      <th>x23</th>\n      <th>x24</th>\n      <th>x24_diff</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2014-03-01</td>\n      <td>8173.549149</td>\n      <td>9.008659</td>\n      <td>6.266041</td>\n      <td>7.826730</td>\n      <td>0.003800</td>\n      <td>0.120600</td>\n      <td>8.442704</td>\n      <td>8.103404</td>\n      <td>10.387952</td>\n      <td>...</td>\n      <td>-0.009671</td>\n      <td>5.390033</td>\n      <td>7.889545</td>\n      <td>9.490387</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.665913</td>\n      <td>9.066736</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2014-06-01</td>\n      <td>9809.436579</td>\n      <td>9.191100</td>\n      <td>6.513495</td>\n      <td>8.049318</td>\n      <td>0.222588</td>\n      <td>0.218788</td>\n      <td>8.650919</td>\n      <td>8.436791</td>\n      <td>10.209559</td>\n      <td>...</td>\n      <td>-0.042429</td>\n      <td>5.394162</td>\n      <td>8.046895</td>\n      <td>9.708583</td>\n      <td>0.218197</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.835378</td>\n      <td>9.182548</td>\n      <td>0.115812</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2014-09-01</td>\n      <td>9980.577105</td>\n      <td>9.208396</td>\n      <td>6.553665</td>\n      <td>8.056709</td>\n      <td>0.007390</td>\n      <td>-0.215198</td>\n      <td>8.695230</td>\n      <td>8.430949</td>\n      <td>10.432081</td>\n      <td>...</td>\n      <td>0.024460</td>\n      <td>5.426798</td>\n      <td>8.081899</td>\n      <td>9.722591</td>\n      <td>0.014007</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.107163</td>\n      <td>9.247077</td>\n      <td>0.064530</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2014-12-01</td>\n      <td>12059.917551</td>\n      <td>9.397643</td>\n      <td>6.543770</td>\n      <td>8.066490</td>\n      <td>0.009781</td>\n      <td>0.002391</td>\n      <td>8.609951</td>\n      <td>8.356033</td>\n      <td>10.457456</td>\n      <td>...</td>\n      <td>0.059248</td>\n      <td>5.458402</td>\n      <td>8.164684</td>\n      <td>9.798750</td>\n      <td>0.076159</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.462094</td>\n      <td>9.315457</td>\n      <td>0.068380</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2015-03-01</td>\n      <td>9221.739669</td>\n      <td>9.129319</td>\n      <td>6.267120</td>\n      <td>7.838667</td>\n      <td>-0.227823</td>\n      <td>-0.237605</td>\n      <td>8.471102</td>\n      <td>8.228746</td>\n      <td>10.216362</td>\n      <td>...</td>\n      <td>-0.024218</td>\n      <td>5.489038</td>\n      <td>7.897363</td>\n      <td>9.510760</td>\n      <td>-0.287990</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.805357</td>\n      <td>9.108839</td>\n      <td>-0.206618</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>2015-06-01</td>\n      <td>10354.088209</td>\n      <td>9.245137</td>\n      <td>6.534001</td>\n      <td>8.007017</td>\n      <td>0.168351</td>\n      <td>0.396174</td>\n      <td>8.579945</td>\n      <td>8.530081</td>\n      <td>10.447552</td>\n      <td>...</td>\n      <td>-0.059958</td>\n      <td>5.518763</td>\n      <td>8.143340</td>\n      <td>9.716409</td>\n      <td>0.205649</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.416547</td>\n      <td>9.278149</td>\n      <td>0.169309</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>2015-09-01</td>\n      <td>10161.038862</td>\n      <td>9.226316</td>\n      <td>6.526775</td>\n      <td>8.012157</td>\n      <td>0.005140</td>\n      <td>-0.163211</td>\n      <td>8.666237</td>\n      <td>8.507559</td>\n      <td>10.442440</td>\n      <td>...</td>\n      <td>0.023584</td>\n      <td>5.547630</td>\n      <td>8.102465</td>\n      <td>9.695342</td>\n      <td>-0.021067</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.335451</td>\n      <td>9.276381</td>\n      <td>-0.001768</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>2015-12-01</td>\n      <td>13770.853260</td>\n      <td>9.530310</td>\n      <td>6.530887</td>\n      <td>8.036984</td>\n      <td>0.024827</td>\n      <td>0.019687</td>\n      <td>8.641887</td>\n      <td>8.383327</td>\n      <td>10.518627</td>\n      <td>...</td>\n      <td>0.053201</td>\n      <td>5.575687</td>\n      <td>8.232222</td>\n      <td>9.809727</td>\n      <td>0.114386</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.542017</td>\n      <td>9.339903</td>\n      <td>0.063522</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>2016-03-01</td>\n      <td>9862.022036</td>\n      <td>9.196447</td>\n      <td>6.310605</td>\n      <td>7.834915</td>\n      <td>-0.202069</td>\n      <td>-0.226896</td>\n      <td>8.425789</td>\n      <td>8.461419</td>\n      <td>10.197466</td>\n      <td>...</td>\n      <td>-0.018444</td>\n      <td>5.602978</td>\n      <td>7.968240</td>\n      <td>9.537685</td>\n      <td>-0.272043</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.300041</td>\n      <td>9.143335</td>\n      <td>-0.196568</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>2016-06-01</td>\n      <td>11269.368323</td>\n      <td>9.329844</td>\n      <td>6.569595</td>\n      <td>8.020708</td>\n      <td>0.185793</td>\n      <td>0.387862</td>\n      <td>8.647810</td>\n      <td>8.572557</td>\n      <td>10.548468</td>\n      <td>...</td>\n      <td>-0.049697</td>\n      <td>5.629544</td>\n      <td>8.197255</td>\n      <td>9.752299</td>\n      <td>0.214615</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.769953</td>\n      <td>9.324704</td>\n      <td>0.181369</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>2016-09-01</td>\n      <td>10998.155661</td>\n      <td>9.305483</td>\n      <td>6.585332</td>\n      <td>8.022890</td>\n      <td>0.002183</td>\n      <td>-0.183610</td>\n      <td>8.691009</td>\n      <td>8.658620</td>\n      <td>10.483231</td>\n      <td>...</td>\n      <td>0.026264</td>\n      <td>5.657070</td>\n      <td>8.166745</td>\n      <td>9.737975</td>\n      <td>-0.014325</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.759222</td>\n      <td>9.336286</td>\n      <td>0.011581</td>\n    </tr>\n    <tr>\n      <th>11</th>\n      <td>2016-12-01</td>\n      <td>15124.493979</td>\n      <td>9.624071</td>\n      <td>6.650938</td>\n      <td>8.069151</td>\n      <td>0.046261</td>\n      <td>0.044078</td>\n      <td>8.698181</td>\n      <td>8.580334</td>\n      <td>10.636735</td>\n      <td>...</td>\n      <td>0.049818</td>\n      <td>5.685460</td>\n      <td>8.286073</td>\n      <td>9.863012</td>\n      <td>0.125038</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.801792</td>\n      <td>9.522549</td>\n      <td>0.186264</td>\n    </tr>\n    <tr>\n      <th>12</th>\n      <td>2017-03-01</td>\n      <td>11260.527043</td>\n      <td>9.329059</td>\n      <td>6.403112</td>\n      <td>7.924040</td>\n      <td>-0.145112</td>\n      <td>-0.191373</td>\n      <td>8.629011</td>\n      <td>8.577826</td>\n      <td>10.352651</td>\n      <td>...</td>\n      <td>-0.012462</td>\n      <td>5.713065</td>\n      <td>8.030145</td>\n      <td>9.613852</td>\n      <td>-0.249161</td>\n      <td>7.885946</td>\n      <td>7.803159</td>\n      <td>7.521296</td>\n      <td>9.363345</td>\n      <td>-0.159205</td>\n    </tr>\n    <tr>\n      <th>13</th>\n      <td>2017-06-01</td>\n      <td>12820.923272</td>\n      <td>9.458834</td>\n      <td>6.628625</td>\n      <td>8.130162</td>\n      <td>0.206122</td>\n      <td>0.351234</td>\n      <td>8.802603</td>\n      <td>8.690898</td>\n      <td>10.685090</td>\n      <td>...</td>\n      <td>-0.036940</td>\n      <td>5.739930</td>\n      <td>8.252161</td>\n      <td>9.789056</td>\n      <td>0.175204</td>\n      <td>8.065793</td>\n      <td>8.065802</td>\n      <td>7.939562</td>\n      <td>9.519962</td>\n      <td>0.156618</td>\n    </tr>\n    <tr>\n      <th>14</th>\n      <td>2017-09-01</td>\n      <td>12576.905083</td>\n      <td>9.439617</td>\n      <td>6.719548</td>\n      <td>8.110193</td>\n      <td>-0.019969</td>\n      <td>-0.226092</td>\n      <td>8.781592</td>\n      <td>8.750994</td>\n      <td>10.648255</td>\n      <td>...</td>\n      <td>0.028878</td>\n      <td>5.770498</td>\n      <td>8.229591</td>\n      <td>9.778969</td>\n      <td>-0.010087</td>\n      <td>8.092857</td>\n      <td>8.050795</td>\n      <td>7.727623</td>\n      <td>9.552717</td>\n      <td>0.032754</td>\n    </tr>\n    <tr>\n      <th>15</th>\n      <td>2017-12-01</td>\n      <td>15744.774602</td>\n      <td>9.664264</td>\n      <td>6.681085</td>\n      <td>8.063217</td>\n      <td>-0.046976</td>\n      <td>-0.027006</td>\n      <td>8.831691</td>\n      <td>8.666386</td>\n      <td>10.665775</td>\n      <td>...</td>\n      <td>0.044971</td>\n      <td>5.804419</td>\n      <td>8.331695</td>\n      <td>9.891021</td>\n      <td>0.112052</td>\n      <td>8.336537</td>\n      <td>8.087275</td>\n      <td>7.892224</td>\n      <td>9.510778</td>\n      <td>-0.041938</td>\n    </tr>\n    <tr>\n      <th>16</th>\n      <td>2018-03-01</td>\n      <td>12500.904859</td>\n      <td>9.433556</td>\n      <td>6.454557</td>\n      <td>7.815691</td>\n      <td>-0.247526</td>\n      <td>-0.200550</td>\n      <td>8.734118</td>\n      <td>8.651823</td>\n      <td>10.466293</td>\n      <td>...</td>\n      <td>-0.019966</td>\n      <td>5.837227</td>\n      <td>8.089194</td>\n      <td>9.657499</td>\n      <td>-0.233523</td>\n      <td>8.105646</td>\n      <td>7.719520</td>\n      <td>7.532666</td>\n      <td>9.518847</td>\n      <td>0.008068</td>\n    </tr>\n    <tr>\n      <th>17</th>\n      <td>2018-06-01</td>\n      <td>14024.959955</td>\n      <td>9.548594</td>\n      <td>6.722089</td>\n      <td>7.966795</td>\n      <td>0.151104</td>\n      <td>0.398630</td>\n      <td>8.870484</td>\n      <td>8.777244</td>\n      <td>10.718629</td>\n      <td>...</td>\n      <td>-0.037061</td>\n      <td>5.868993</td>\n      <td>8.309841</td>\n      <td>9.814157</td>\n      <td>0.156659</td>\n      <td>8.222285</td>\n      <td>7.893353</td>\n      <td>8.045229</td>\n      <td>9.669763</td>\n      <td>0.150917</td>\n    </tr>\n    <tr>\n      <th>18</th>\n      <td>2018-09-01</td>\n      <td>14797.511808</td>\n      <td>9.602214</td>\n      <td>6.780542</td>\n      <td>8.057377</td>\n      <td>0.090583</td>\n      <td>-0.060521</td>\n      <td>8.958564</td>\n      <td>8.839240</td>\n      <td>10.731633</td>\n      <td>...</td>\n      <td>0.023140</td>\n      <td>5.905246</td>\n      <td>8.276681</td>\n      <td>9.811521</td>\n      <td>-0.002636</td>\n      <td>8.160084</td>\n      <td>8.023069</td>\n      <td>7.706968</td>\n      <td>9.686991</td>\n      <td>0.017227</td>\n    </tr>\n    <tr>\n      <th>19</th>\n      <td>2018-12-01</td>\n      <td>16679.463378</td>\n      <td>9.721934</td>\n      <td>6.721266</td>\n      <td>8.052105</td>\n      <td>-0.005272</td>\n      <td>-0.095855</td>\n      <td>8.911270</td>\n      <td>8.740820</td>\n      <td>10.771663</td>\n      <td>...</td>\n      <td>0.019946</td>\n      <td>5.945481</td>\n      <td>8.358024</td>\n      <td>9.903152</td>\n      <td>0.091630</td>\n      <td>8.414243</td>\n      <td>8.111863</td>\n      <td>7.841788</td>\n      <td>9.741804</td>\n      <td>0.054813</td>\n    </tr>\n    <tr>\n      <th>20</th>\n      <td>2019-03-01</td>\n      <td>13746.208200</td>\n      <td>9.528518</td>\n      <td>6.478617</td>\n      <td>7.895250</td>\n      <td>-0.156856</td>\n      <td>-0.151584</td>\n      <td>8.800214</td>\n      <td>8.737684</td>\n      <td>10.523674</td>\n      <td>...</td>\n      <td>-0.024838</td>\n      <td>5.984159</td>\n      <td>8.154385</td>\n      <td>9.675966</td>\n      <td>-0.227186</td>\n      <td>8.247914</td>\n      <td>7.836903</td>\n      <td>7.388989</td>\n      <td>9.702099</td>\n      <td>-0.039704</td>\n    </tr>\n    <tr>\n      <th>21</th>\n      <td>2019-06-01</td>\n      <td>15291.328500</td>\n      <td>9.635041</td>\n      <td>6.710568</td>\n      <td>8.026824</td>\n      <td>0.131574</td>\n      <td>0.288429</td>\n      <td>8.916509</td>\n      <td>8.886566</td>\n      <td>10.776203</td>\n      <td>...</td>\n      <td>-0.052819</td>\n      <td>6.021397</td>\n      <td>8.296108</td>\n      <td>9.769750</td>\n      <td>0.093785</td>\n      <td>8.340358</td>\n      <td>8.101902</td>\n      <td>7.960844</td>\n      <td>9.814525</td>\n      <td>0.112426</td>\n    </tr>\n    <tr>\n      <th>22</th>\n      <td>2019-09-01</td>\n      <td>15898.690600</td>\n      <td>9.673992</td>\n      <td>6.792549</td>\n      <td>8.049108</td>\n      <td>0.022284</td>\n      <td>-0.109290</td>\n      <td>9.028938</td>\n      <td>8.948516</td>\n      <td>10.792899</td>\n      <td>...</td>\n      <td>-0.016012</td>\n      <td>6.052049</td>\n      <td>8.320796</td>\n      <td>9.806156</td>\n      <td>0.036405</td>\n      <td>8.339365</td>\n      <td>8.205513</td>\n      <td>7.765238</td>\n      <td>9.364262</td>\n      <td>-0.450263</td>\n    </tr>\n    <tr>\n      <th>23</th>\n      <td>2019-12-01</td>\n      <td>17525.759000</td>\n      <td>9.771427</td>\n      <td>6.780160</td>\n      <td>8.034048</td>\n      <td>-0.015060</td>\n      <td>-0.037344</td>\n      <td>9.036131</td>\n      <td>8.831396</td>\n      <td>10.844187</td>\n      <td>...</td>\n      <td>0.016951</td>\n      <td>6.076667</td>\n      <td>8.421019</td>\n      <td>9.894765</td>\n      <td>0.088609</td>\n      <td>8.714331</td>\n      <td>8.340391</td>\n      <td>7.838552</td>\n      <td>10.209497</td>\n      <td>0.845234</td>\n    </tr>\n    <tr>\n      <th>24</th>\n      <td>2020-03-01</td>\n      <td>13118.619000</td>\n      <td>9.481788</td>\n      <td>6.261448</td>\n      <td>7.743447</td>\n      <td>-0.290600</td>\n      <td>-0.275540</td>\n      <td>8.747717</td>\n      <td>8.069321</td>\n      <td>10.316623</td>\n      <td>...</td>\n      <td>-0.063459</td>\n      <td>6.100694</td>\n      <td>8.063803</td>\n      <td>9.481710</td>\n      <td>-0.413054</td>\n      <td>8.308963</td>\n      <td>7.761259</td>\n      <td>7.205412</td>\n      <td>9.602376</td>\n      <td>-0.607121</td>\n    </tr>\n    <tr>\n      <th>25</th>\n      <td>2020-06-01</td>\n      <td>15924.495500</td>\n      <td>9.675614</td>\n      <td>6.771893</td>\n      <td>7.977153</td>\n      <td>0.233706</td>\n      <td>0.524306</td>\n      <td>9.040323</td>\n      <td>8.377218</td>\n      <td>10.833200</td>\n      <td>...</td>\n      <td>-0.059554</td>\n      <td>6.124157</td>\n      <td>8.376650</td>\n      <td>9.841165</td>\n      <td>0.359455</td>\n      <td>8.531676</td>\n      <td>8.234806</td>\n      <td>8.071109</td>\n      <td>9.984740</td>\n      <td>0.382365</td>\n    </tr>\n    <tr>\n      <th>26</th>\n      <td>2020-09-01</td>\n      <td>16666.081900</td>\n      <td>9.721131</td>\n      <td>6.856591</td>\n      <td>8.107328</td>\n      <td>0.130175</td>\n      <td>-0.103531</td>\n      <td>9.179623</td>\n      <td>8.719646</td>\n      <td>10.917506</td>\n      <td>...</td>\n      <td>0.042132</td>\n      <td>6.153309</td>\n      <td>8.391258</td>\n      <td>9.890580</td>\n      <td>0.049414</td>\n      <td>8.606465</td>\n      <td>8.187835</td>\n      <td>7.874804</td>\n      <td>10.040271</td>\n      <td>0.055531</td>\n    </tr>\n    <tr>\n      <th>27</th>\n      <td>2020-12-01</td>\n      <td>18979.867289</td>\n      <td>9.851134</td>\n      <td>6.859935</td>\n      <td>8.186771</td>\n      <td>0.079442</td>\n      <td>-0.050733</td>\n      <td>9.149858</td>\n      <td>8.722346</td>\n      <td>10.958312</td>\n      <td>...</td>\n      <td>0.038960</td>\n      <td>6.187652</td>\n      <td>8.523269</td>\n      <td>10.015731</td>\n      <td>0.125151</td>\n      <td>8.858408</td>\n      <td>8.465818</td>\n      <td>8.030338</td>\n      <td>10.159141</td>\n      <td>0.118870</td>\n    </tr>\n    <tr>\n      <th>28</th>\n      <td>2021-03-01</td>\n      <td>16273.314400</td>\n      <td>9.697282</td>\n      <td>6.660558</td>\n      <td>8.075925</td>\n      <td>-0.110846</td>\n      <td>-0.190288</td>\n      <td>9.061086</td>\n      <td>8.468740</td>\n      <td>10.632316</td>\n      <td>...</td>\n      <td>-0.008099</td>\n      <td>6.220854</td>\n      <td>8.388785</td>\n      <td>9.858825</td>\n      <td>-0.156906</td>\n      <td>8.651983</td>\n      <td>8.107396</td>\n      <td>7.863621</td>\n      <td>10.073365</td>\n      <td>-0.085776</td>\n    </tr>\n    <tr>\n      <th>29</th>\n      <td>2021-06-01</td>\n      <td>18137.491900</td>\n      <td>9.805736</td>\n      <td>6.890753</td>\n      <td>8.235599</td>\n      <td>0.159674</td>\n      <td>0.270520</td>\n      <td>9.265841</td>\n      <td>8.854006</td>\n      <td>10.961106</td>\n      <td>...</td>\n      <td>-0.013044</td>\n      <td>6.252989</td>\n      <td>8.551038</td>\n      <td>10.051520</td>\n      <td>0.192695</td>\n      <td>8.772798</td>\n      <td>8.342526</td>\n      <td>8.158456</td>\n      <td>10.298673</td>\n      <td>0.225308</td>\n    </tr>\n    <tr>\n      <th>30</th>\n      <td>2021-09-01</td>\n      <td>18238.748600</td>\n      <td>9.811304</td>\n      <td>6.956559</td>\n      <td>8.277158</td>\n      <td>0.041559</td>\n      <td>-0.118116</td>\n      <td>9.282531</td>\n      <td>8.704541</td>\n      <td>10.992627</td>\n      <td>...</td>\n      <td>0.027543</td>\n      <td>6.285659</td>\n      <td>8.547552</td>\n      <td>10.060004</td>\n      <td>0.008484</td>\n      <td>8.795129</td>\n      <td>8.321944</td>\n      <td>7.617351</td>\n      <td>10.252133</td>\n      <td>-0.046540</td>\n    </tr>\n    <tr>\n      <th>31</th>\n      <td>2021-12-01</td>\n      <td>20866.202800</td>\n      <td>9.945886</td>\n      <td>6.860005</td>\n      <td>8.378069</td>\n      <td>0.100911</td>\n      <td>0.059353</td>\n      <td>9.347508</td>\n      <td>8.480760</td>\n      <td>10.961281</td>\n      <td>...</td>\n      <td>0.027326</td>\n      <td>6.318780</td>\n      <td>8.644478</td>\n      <td>10.153752</td>\n      <td>0.093748</td>\n      <td>9.005747</td>\n      <td>8.465016</td>\n      <td>7.530357</td>\n      <td>10.330381</td>\n      <td>0.078248</td>\n    </tr>\n    <tr>\n      <th>32</th>\n      <td>2022-03-01</td>\n      <td>17886.386900</td>\n      <td>9.791795</td>\n      <td>6.719769</td>\n      <td>8.307953</td>\n      <td>-0.070117</td>\n      <td>-0.171028</td>\n      <td>9.283219</td>\n      <td>8.268384</td>\n      <td>10.698489</td>\n      <td>...</td>\n      <td>-0.007372</td>\n      <td>6.350839</td>\n      <td>8.578260</td>\n      <td>10.037280</td>\n      <td>-0.116472</td>\n      <td>8.783024</td>\n      <td>8.228220</td>\n      <td>7.394462</td>\n      <td>7.859645</td>\n      <td>-2.470736</td>\n    </tr>\n  </tbody>\n</table>\n<p>33 rows × 45 columns</p>\n</div>"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_excel('E:/data.xlsx',sheet_name=0)\n",
    "df.iloc[:-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "                GDP         y        x1        x2   x2_diff  x2_diff2  \\\nGDP        1.000000  0.993002  0.828457  0.689757  0.210239  0.048780   \ny          0.993002  1.000000  0.829134  0.658974  0.203291  0.052114   \nx1         0.828457  0.829134  1.000000  0.814346  0.577211  0.242511   \nx2         0.689757  0.658974  0.814346  1.000000  0.519855  0.146905   \nx2_diff    0.210239  0.203291  0.577211  0.519855  1.000000  0.811409   \nx2_diff2   0.048780  0.052114  0.242511  0.146905  0.811409  1.000000   \nx3         0.927287  0.911250  0.864623  0.750466  0.293414  0.056851   \nx41        0.425263  0.465010  0.655497  0.322027  0.333204  0.131407   \nx42        0.891375  0.885114  0.937000  0.713486  0.477081  0.250185   \nx43        0.883090  0.895260  0.921697  0.638169  0.469372  0.245098   \nx44        0.890302  0.892734  0.949349  0.690294  0.483945  0.250388   \nx44_diff   0.115896  0.124352  0.484752  0.320144  0.883082  0.833691   \nx71        0.121118  0.149835  0.420388  0.171972  0.229514  0.031836   \nx72        0.912258  0.901144  0.930776  0.755945  0.446095  0.223923   \nx73        0.792176  0.796806  0.858425  0.591778  0.501125  0.304559   \nx74        0.836432  0.838270  0.909644  0.651465  0.503129  0.285343   \nx74_diff   0.088538  0.099718  0.440722  0.308223  0.839608  0.826602   \nx8         0.888708  0.882523  0.673552  0.522817  0.037903 -0.044440   \nx9         0.884198  0.869942  0.665439  0.534159  0.046156 -0.045471   \nx9_diff    0.350281  0.356741  0.062441 -0.150722 -0.315628 -0.147350   \nx9_diff2  -0.205355 -0.210533 -0.532031 -0.433543 -0.762867 -0.563504   \nx91        0.882995  0.868700  0.664003  0.533524  0.044661 -0.046676   \nx92        0.809329  0.828274  0.592825  0.395896  0.003571 -0.062456   \nx10        0.169906  0.094849  0.105448  0.593632 -0.006523 -0.159275   \nx11       -0.660263 -0.620816 -0.536675 -0.538187 -0.207949 -0.098575   \nx12        0.865163  0.850585  0.548115  0.477689 -0.109171 -0.120435   \nx13        0.678950  0.624426  0.388317  0.471074 -0.107831 -0.121070   \nx14        0.381077  0.379794  0.317395  0.023229  0.007067 -0.146926   \nx15        0.898694  0.889759  0.655016  0.509648 -0.006284 -0.071595   \nx16       -0.646232 -0.619339 -0.535443 -0.432585 -0.230174 -0.144115   \nx16_diff   0.218947  0.208010  0.323122  0.420439 -0.002174 -0.412504   \nx17        0.895980  0.883057  0.642457  0.516960 -0.015783 -0.080059   \nx17_diff   0.450071  0.445067  0.190234  0.211453 -0.392083 -0.504001   \nx167      -0.322776 -0.297346 -0.343835 -0.242336 -0.358879 -0.285743   \nx167_diff  0.280933  0.270065  0.333257  0.425019 -0.053597 -0.446675   \nx18        0.898700  0.895502  0.677097  0.500057  0.025227 -0.050775   \nx19        0.948842  0.939483  0.910957  0.839345  0.400167  0.179438   \nx20        0.872758  0.855346  0.913284  0.920416  0.475905  0.190152   \nx20_diff   0.263149  0.264696  0.609664  0.504985  0.931463  0.800653   \nx21        0.956218  0.950800  0.650086  0.687633  0.272901  0.059903   \nx22        0.898867  0.893085  0.863120  0.831350  0.598199  0.247567   \nx23        0.654395  0.706583  0.735980  0.413391  0.404722  0.331983   \nx24        0.554079  0.551368  0.542622  0.228821  0.250956  0.169987   \nx24_diff  -0.078502 -0.073120  0.131413 -0.150161  0.357223  0.362603   \n\n                 x3       x41       x42       x43  ...  x167_diff       x18  \\\nGDP        0.927287  0.425263  0.891375  0.883090  ...   0.280933  0.898700   \ny          0.911250  0.465010  0.885114  0.895260  ...   0.270065  0.895502   \nx1         0.864623  0.655497  0.937000  0.921697  ...   0.333257  0.677097   \nx2         0.750466  0.322027  0.713486  0.638169  ...   0.425019  0.500057   \nx2_diff    0.293414  0.333204  0.477081  0.469372  ...  -0.053597  0.025227   \nx2_diff2   0.056851  0.131407  0.250185  0.245098  ...  -0.446675 -0.050775   \nx3         1.000000  0.410013  0.886662  0.888948  ...   0.170101  0.917577   \nx41        0.410013  1.000000  0.593957  0.647045  ...   0.143374  0.335624   \nx42        0.886662  0.593957  1.000000  0.935941  ...   0.276664  0.777808   \nx43        0.888948  0.647045  0.935941  1.000000  ...   0.155846  0.804822   \nx44        0.888782  0.665448  0.989592  0.972605  ...   0.237495  0.785882   \nx44_diff   0.150838  0.381719  0.449519  0.397597  ...  -0.080720 -0.066224   \nx71        0.138632  0.909946  0.354080  0.362887  ...   0.172178  0.045775   \nx72        0.907990  0.545954  0.992194  0.921421  ...   0.289955  0.802733   \nx73        0.818033  0.526070  0.889635  0.938580  ...   0.138806  0.719313   \nx74        0.856222  0.593961  0.943845  0.961607  ...   0.189982  0.749114   \nx74_diff   0.158246  0.316389  0.412874  0.387406  ...  -0.145009 -0.047750   \nx8         0.919347  0.299498  0.766214  0.783164  ...  -0.004438  0.995500   \nx9         0.927701  0.250748  0.757290  0.776652  ...  -0.007178  0.989483   \nx9_diff    0.409587 -0.036596  0.179957  0.304778  ...  -0.399808  0.621386   \nx9_diff2  -0.231088 -0.455280 -0.457019 -0.440930  ...  -0.076557  0.001081   \nx91        0.926960  0.248433  0.755328  0.774918  ...  -0.007671  0.988949   \nx92        0.766218  0.404694  0.697472  0.725837  ...   0.035306  0.890346   \nx10        0.251570 -0.401171  0.064231 -0.096023  ...   0.328311  0.095224   \nx11       -0.802547  0.050886 -0.585804 -0.573885  ...   0.121980 -0.794770   \nx12        0.855144  0.152286  0.662419  0.672059  ...   0.006675  0.962006   \nx13        0.721727 -0.064359  0.483212  0.456929  ...   0.009957  0.748132   \nx14        0.342366  0.153989  0.356727  0.445107  ...   0.177494  0.339526   \nx15        0.913773  0.283760  0.760346  0.772459  ...   0.022696  0.993976   \nx16       -0.783739 -0.025366 -0.596214 -0.619416  ...   0.211496 -0.807402   \nx16_diff   0.123814  0.162007  0.247885  0.123259  ...   0.992972 -0.072301   \nx17        0.912863  0.250502  0.747475  0.757186  ...   0.025562  0.989864   \nx17_diff   0.262555  0.031135  0.264869  0.191158  ...   0.686057  0.280751   \nx167      -0.511433  0.097599 -0.363973 -0.402970  ...   0.362615 -0.503742   \nx167_diff  0.170101  0.143374  0.276664  0.155846  ...   1.000000 -0.004699   \nx18        0.917577  0.335624  0.777808  0.804822  ...  -0.004699  1.000000   \nx19        0.937463  0.439544  0.914991  0.884795  ...   0.283076  0.830018   \nx20        0.861737  0.435211  0.863470  0.807233  ...   0.423058  0.669929   \nx20_diff   0.257120  0.339432  0.496042  0.483494  ...   0.070441 -0.019793   \nx21        0.921197 -0.151045  0.732715  0.665036  ...   0.346332  0.917310   \nx22        0.857974  0.177394  0.901757  0.808383  ...   0.467926  0.665465   \nx23        0.572576  0.703473  0.753741  0.764234  ...   0.123773  0.568496   \nx24        0.492865  0.484554  0.621022  0.615016  ...   0.134227  0.488473   \nx24_diff  -0.172458  0.391596  0.130866  0.117953  ...   0.083656 -0.250634   \n\n                x19       x20  x20_diff       x21       x22       x23  \\\nGDP        0.948842  0.872758  0.263149  0.956218  0.898867  0.654395   \ny          0.939483  0.855346  0.264696  0.950800  0.893085  0.706583   \nx1         0.910957  0.913284  0.609664  0.650086  0.863120  0.735980   \nx2         0.839345  0.920416  0.504985  0.687633  0.831350  0.413391   \nx2_diff    0.400167  0.475905  0.931463  0.272901  0.598199  0.404722   \nx2_diff2   0.179438  0.190152  0.800653  0.059903  0.247567  0.331983   \nx3         0.937463  0.861737  0.257120  0.921197  0.857974  0.572576   \nx41        0.439544  0.435211  0.339432 -0.151045  0.177394  0.703473   \nx42        0.914991  0.863470  0.496042  0.732715  0.901757  0.753741   \nx43        0.884795  0.807233  0.483494  0.665036  0.808383  0.764234   \nx44        0.907209  0.849074  0.500186  0.679629  0.865962  0.781993   \nx44_diff   0.286271  0.353337  0.907862  0.081666  0.408906  0.491719   \nx71        0.157016  0.196692  0.197966 -0.303647  0.017168  0.437774   \nx72        0.941547  0.893624  0.463816  0.790100  0.920284  0.729998   \nx73        0.827208  0.752792  0.515851  0.646486  0.720492  0.670519   \nx74        0.871998  0.807627  0.516961  0.669205  0.785970  0.715938   \nx74_diff   0.278520  0.331577  0.858669  0.048368  0.335390  0.466354   \nx8         0.833201  0.679447 -0.014757  0.909956  0.662584  0.560468   \nx9         0.829707  0.680407 -0.009187  0.912402  0.663803  0.495717   \nx9_diff    0.195824  0.004165 -0.396301  0.061952 -0.304630  0.068946   \nx9_diff2  -0.351474 -0.435534 -0.798271 -0.273802 -0.556015 -0.431597   \nx91        0.828731  0.679414 -0.010785  0.911448  0.661376  0.494570   \nx92        0.732714  0.575261 -0.035222  0.756537  0.530460  0.667444   \nx10        0.277618  0.390712 -0.020941  0.594715  0.523495 -0.328226   \nx11       -0.690305 -0.576605 -0.112912 -0.819430 -0.631217 -0.273053   \nx12        0.785559  0.635660 -0.133192  0.874502  0.553610  0.422959   \nx13        0.624930  0.541320 -0.123159  0.836118  0.533997  0.057728   \nx14        0.258670  0.177667  0.074282  0.421727  0.406654  0.175972   \nx15        0.829150  0.678349 -0.046469  0.924449  0.641415  0.532277   \nx16       -0.655793 -0.509763 -0.129055 -0.765616 -0.581007 -0.345742   \nx16_diff   0.240440  0.396026  0.108443  0.288774  0.449076  0.104370   \nx17        0.827108  0.679485 -0.054316  0.923133  0.636884  0.499401   \nx17_diff   0.320687  0.345180 -0.227674  0.408305  0.268622  0.145282   \nx167      -0.378465 -0.255123 -0.231427 -0.578285 -0.469120 -0.192066   \nx167_diff  0.283076  0.423058  0.070441  0.346332  0.467926  0.123773   \nx18        0.830018  0.669929 -0.019793  0.917310  0.665465  0.568496   \nx19        1.000000  0.961283  0.446126  0.903906  0.918034  0.688097   \nx20        0.961283  1.000000  0.547298  0.817630  0.889677  0.615682   \nx20_diff   0.446126  0.547298  1.000000  0.317726  0.645431  0.503202   \nx21        0.903906  0.817630  0.317726  1.000000  0.841239  0.155048   \nx22        0.918034  0.889677  0.645431  0.841239  1.000000  0.439316   \nx23        0.688097  0.615682  0.503202  0.155048  0.439316  1.000000   \nx24        0.469144  0.419467  0.261581  0.319815  0.348663  0.553158   \nx24_diff  -0.099290 -0.034051  0.428928 -0.088356  0.094279  0.295716   \n\n                x24  x24_diff  \nGDP        0.554079 -0.078502  \ny          0.551368 -0.073120  \nx1         0.542622  0.131413  \nx2         0.228821 -0.150161  \nx2_diff    0.250956  0.357223  \nx2_diff2   0.169987  0.362603  \nx3         0.492865 -0.172458  \nx41        0.484554  0.391596  \nx42        0.621022  0.130866  \nx43        0.615016  0.117953  \nx44        0.634296  0.149868  \nx44_diff   0.265097  0.485705  \nx71        0.256464  0.323581  \nx72        0.596423  0.073157  \nx73        0.525634  0.095617  \nx74        0.565787  0.112281  \nx74_diff   0.213396  0.413803  \nx8         0.477554 -0.266231  \nx9         0.467253 -0.278010  \nx9_diff    0.142771 -0.347061  \nx9_diff2  -0.379767 -0.513241  \nx91        0.467761 -0.277651  \nx92        0.428952 -0.197344  \nx10       -0.239530 -0.449734  \nx11       -0.339985  0.275326  \nx12        0.359779 -0.379973  \nx13        0.301564 -0.314538  \nx14        0.456191  0.237626  \nx15        0.473155 -0.274338  \nx16       -0.416922  0.180806  \nx16_diff   0.110520  0.111528  \nx17        0.458159 -0.291239  \nx17_diff   0.220461 -0.027962  \nx167      -0.320223  0.033385  \nx167_diff  0.134227  0.083656  \nx18        0.488473 -0.250634  \nx19        0.469144 -0.099290  \nx20        0.419467 -0.034051  \nx20_diff   0.261581  0.428928  \nx21        0.319815 -0.088356  \nx22        0.348663  0.094279  \nx23        0.553158  0.295716  \nx24        1.000000  0.704588  \nx24_diff   0.704588  1.000000  \n\n[44 rows x 44 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>GDP</th>\n      <th>y</th>\n      <th>x1</th>\n      <th>x2</th>\n      <th>x2_diff</th>\n      <th>x2_diff2</th>\n      <th>x3</th>\n      <th>x41</th>\n      <th>x42</th>\n      <th>x43</th>\n      <th>...</th>\n      <th>x167_diff</th>\n      <th>x18</th>\n      <th>x19</th>\n      <th>x20</th>\n      <th>x20_diff</th>\n      <th>x21</th>\n      <th>x22</th>\n      <th>x23</th>\n      <th>x24</th>\n      <th>x24_diff</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>GDP</th>\n      <td>1.000000</td>\n      <td>0.993002</td>\n      <td>0.828457</td>\n      <td>0.689757</td>\n      <td>0.210239</td>\n      <td>0.048780</td>\n      <td>0.927287</td>\n      <td>0.425263</td>\n      <td>0.891375</td>\n      <td>0.883090</td>\n      <td>...</td>\n      <td>0.280933</td>\n      <td>0.898700</td>\n      <td>0.948842</td>\n      <td>0.872758</td>\n      <td>0.263149</td>\n      <td>0.956218</td>\n      <td>0.898867</td>\n      <td>0.654395</td>\n      <td>0.554079</td>\n      <td>-0.078502</td>\n    </tr>\n    <tr>\n      <th>y</th>\n      <td>0.993002</td>\n      <td>1.000000</td>\n      <td>0.829134</td>\n      <td>0.658974</td>\n      <td>0.203291</td>\n      <td>0.052114</td>\n      <td>0.911250</td>\n      <td>0.465010</td>\n      <td>0.885114</td>\n      <td>0.895260</td>\n      <td>...</td>\n      <td>0.270065</td>\n      <td>0.895502</td>\n      <td>0.939483</td>\n      <td>0.855346</td>\n      <td>0.264696</td>\n      <td>0.950800</td>\n      <td>0.893085</td>\n      <td>0.706583</td>\n      <td>0.551368</td>\n      <td>-0.073120</td>\n    </tr>\n    <tr>\n      <th>x1</th>\n      <td>0.828457</td>\n      <td>0.829134</td>\n      <td>1.000000</td>\n      <td>0.814346</td>\n      <td>0.577211</td>\n      <td>0.242511</td>\n      <td>0.864623</td>\n      <td>0.655497</td>\n      <td>0.937000</td>\n      <td>0.921697</td>\n      <td>...</td>\n      <td>0.333257</td>\n      <td>0.677097</td>\n      <td>0.910957</td>\n      <td>0.913284</td>\n      <td>0.609664</td>\n      <td>0.650086</td>\n      <td>0.863120</td>\n      <td>0.735980</td>\n      <td>0.542622</td>\n      <td>0.131413</td>\n    </tr>\n    <tr>\n      <th>x2</th>\n      <td>0.689757</td>\n      <td>0.658974</td>\n      <td>0.814346</td>\n      <td>1.000000</td>\n      <td>0.519855</td>\n      <td>0.146905</td>\n      <td>0.750466</td>\n      <td>0.322027</td>\n      <td>0.713486</td>\n      <td>0.638169</td>\n      <td>...</td>\n      <td>0.425019</td>\n      <td>0.500057</td>\n      <td>0.839345</td>\n      <td>0.920416</td>\n      <td>0.504985</td>\n      <td>0.687633</td>\n      <td>0.831350</td>\n      <td>0.413391</td>\n      <td>0.228821</td>\n      <td>-0.150161</td>\n    </tr>\n    <tr>\n      <th>x2_diff</th>\n      <td>0.210239</td>\n      <td>0.203291</td>\n      <td>0.577211</td>\n      <td>0.519855</td>\n      <td>1.000000</td>\n      <td>0.811409</td>\n      <td>0.293414</td>\n      <td>0.333204</td>\n      <td>0.477081</td>\n      <td>0.469372</td>\n      <td>...</td>\n      <td>-0.053597</td>\n      <td>0.025227</td>\n      <td>0.400167</td>\n      <td>0.475905</td>\n      <td>0.931463</td>\n      <td>0.272901</td>\n      <td>0.598199</td>\n      <td>0.404722</td>\n      <td>0.250956</td>\n      <td>0.357223</td>\n    </tr>\n    <tr>\n      <th>x2_diff2</th>\n      <td>0.048780</td>\n      <td>0.052114</td>\n      <td>0.242511</td>\n      <td>0.146905</td>\n      <td>0.811409</td>\n      <td>1.000000</td>\n      <td>0.056851</td>\n      <td>0.131407</td>\n      <td>0.250185</td>\n      <td>0.245098</td>\n      <td>...</td>\n      <td>-0.446675</td>\n      <td>-0.050775</td>\n      <td>0.179438</td>\n      <td>0.190152</td>\n      <td>0.800653</td>\n      <td>0.059903</td>\n      <td>0.247567</td>\n      <td>0.331983</td>\n      <td>0.169987</td>\n      <td>0.362603</td>\n    </tr>\n    <tr>\n      <th>x3</th>\n      <td>0.927287</td>\n      <td>0.911250</td>\n      <td>0.864623</td>\n      <td>0.750466</td>\n      <td>0.293414</td>\n      <td>0.056851</td>\n      <td>1.000000</td>\n      <td>0.410013</td>\n      <td>0.886662</td>\n      <td>0.888948</td>\n      <td>...</td>\n      <td>0.170101</td>\n      <td>0.917577</td>\n      <td>0.937463</td>\n      <td>0.861737</td>\n      <td>0.257120</td>\n      <td>0.921197</td>\n      <td>0.857974</td>\n      <td>0.572576</td>\n      <td>0.492865</td>\n      <td>-0.172458</td>\n    </tr>\n    <tr>\n      <th>x41</th>\n      <td>0.425263</td>\n      <td>0.465010</td>\n      <td>0.655497</td>\n      <td>0.322027</td>\n      <td>0.333204</td>\n      <td>0.131407</td>\n      <td>0.410013</td>\n      <td>1.000000</td>\n      <td>0.593957</td>\n      <td>0.647045</td>\n      <td>...</td>\n      <td>0.143374</td>\n      <td>0.335624</td>\n      <td>0.439544</td>\n      <td>0.435211</td>\n      <td>0.339432</td>\n      <td>-0.151045</td>\n      <td>0.177394</td>\n      <td>0.703473</td>\n      <td>0.484554</td>\n      <td>0.391596</td>\n    </tr>\n    <tr>\n      <th>x42</th>\n      <td>0.891375</td>\n      <td>0.885114</td>\n      <td>0.937000</td>\n      <td>0.713486</td>\n      <td>0.477081</td>\n      <td>0.250185</td>\n      <td>0.886662</td>\n      <td>0.593957</td>\n      <td>1.000000</td>\n      <td>0.935941</td>\n      <td>...</td>\n      <td>0.276664</td>\n      <td>0.777808</td>\n      <td>0.914991</td>\n      <td>0.863470</td>\n      <td>0.496042</td>\n      <td>0.732715</td>\n      <td>0.901757</td>\n      <td>0.753741</td>\n      <td>0.621022</td>\n      <td>0.130866</td>\n    </tr>\n    <tr>\n      <th>x43</th>\n      <td>0.883090</td>\n      <td>0.895260</td>\n      <td>0.921697</td>\n      <td>0.638169</td>\n      <td>0.469372</td>\n      <td>0.245098</td>\n      <td>0.888948</td>\n      <td>0.647045</td>\n      <td>0.935941</td>\n      <td>1.000000</td>\n      <td>...</td>\n      <td>0.155846</td>\n      <td>0.804822</td>\n      <td>0.884795</td>\n      <td>0.807233</td>\n      <td>0.483494</td>\n      <td>0.665036</td>\n      <td>0.808383</td>\n      <td>0.764234</td>\n      <td>0.615016</td>\n      <td>0.117953</td>\n    </tr>\n    <tr>\n      <th>x44</th>\n      <td>0.890302</td>\n      <td>0.892734</td>\n      <td>0.949349</td>\n      <td>0.690294</td>\n      <td>0.483945</td>\n      <td>0.250388</td>\n      <td>0.888782</td>\n      <td>0.665448</td>\n      <td>0.989592</td>\n      <td>0.972605</td>\n      <td>...</td>\n      <td>0.237495</td>\n      <td>0.785882</td>\n      <td>0.907209</td>\n      <td>0.849074</td>\n      <td>0.500186</td>\n      <td>0.679629</td>\n      <td>0.865962</td>\n      <td>0.781993</td>\n      <td>0.634296</td>\n      <td>0.149868</td>\n    </tr>\n    <tr>\n      <th>x44_diff</th>\n      <td>0.115896</td>\n      <td>0.124352</td>\n      <td>0.484752</td>\n      <td>0.320144</td>\n      <td>0.883082</td>\n      <td>0.833691</td>\n      <td>0.150838</td>\n      <td>0.381719</td>\n      <td>0.449519</td>\n      <td>0.397597</td>\n      <td>...</td>\n      <td>-0.080720</td>\n      <td>-0.066224</td>\n      <td>0.286271</td>\n      <td>0.353337</td>\n      <td>0.907862</td>\n      <td>0.081666</td>\n      <td>0.408906</td>\n      <td>0.491719</td>\n      <td>0.265097</td>\n      <td>0.485705</td>\n    </tr>\n    <tr>\n      <th>x71</th>\n      <td>0.121118</td>\n      <td>0.149835</td>\n      <td>0.420388</td>\n      <td>0.171972</td>\n      <td>0.229514</td>\n      <td>0.031836</td>\n      <td>0.138632</td>\n      <td>0.909946</td>\n      <td>0.354080</td>\n      <td>0.362887</td>\n      <td>...</td>\n      <td>0.172178</td>\n      <td>0.045775</td>\n      <td>0.157016</td>\n      <td>0.196692</td>\n      <td>0.197966</td>\n      <td>-0.303647</td>\n      <td>0.017168</td>\n      <td>0.437774</td>\n      <td>0.256464</td>\n      <td>0.323581</td>\n    </tr>\n    <tr>\n      <th>x72</th>\n      <td>0.912258</td>\n      <td>0.901144</td>\n      <td>0.930776</td>\n      <td>0.755945</td>\n      <td>0.446095</td>\n      <td>0.223923</td>\n      <td>0.907990</td>\n      <td>0.545954</td>\n      <td>0.992194</td>\n      <td>0.921421</td>\n      <td>...</td>\n      <td>0.289955</td>\n      <td>0.802733</td>\n      <td>0.941547</td>\n      <td>0.893624</td>\n      <td>0.463816</td>\n      <td>0.790100</td>\n      <td>0.920284</td>\n      <td>0.729998</td>\n      <td>0.596423</td>\n      <td>0.073157</td>\n    </tr>\n    <tr>\n      <th>x73</th>\n      <td>0.792176</td>\n      <td>0.796806</td>\n      <td>0.858425</td>\n      <td>0.591778</td>\n      <td>0.501125</td>\n      <td>0.304559</td>\n      <td>0.818033</td>\n      <td>0.526070</td>\n      <td>0.889635</td>\n      <td>0.938580</td>\n      <td>...</td>\n      <td>0.138806</td>\n      <td>0.719313</td>\n      <td>0.827208</td>\n      <td>0.752792</td>\n      <td>0.515851</td>\n      <td>0.646486</td>\n      <td>0.720492</td>\n      <td>0.670519</td>\n      <td>0.525634</td>\n      <td>0.095617</td>\n    </tr>\n    <tr>\n      <th>x74</th>\n      <td>0.836432</td>\n      <td>0.838270</td>\n      <td>0.909644</td>\n      <td>0.651465</td>\n      <td>0.503129</td>\n      <td>0.285343</td>\n      <td>0.856222</td>\n      <td>0.593961</td>\n      <td>0.943845</td>\n      <td>0.961607</td>\n      <td>...</td>\n      <td>0.189982</td>\n      <td>0.749114</td>\n      <td>0.871998</td>\n      <td>0.807627</td>\n      <td>0.516961</td>\n      <td>0.669205</td>\n      <td>0.785970</td>\n      <td>0.715938</td>\n      <td>0.565787</td>\n      <td>0.112281</td>\n    </tr>\n    <tr>\n      <th>x74_diff</th>\n      <td>0.088538</td>\n      <td>0.099718</td>\n      <td>0.440722</td>\n      <td>0.308223</td>\n      <td>0.839608</td>\n      <td>0.826602</td>\n      <td>0.158246</td>\n      <td>0.316389</td>\n      <td>0.412874</td>\n      <td>0.387406</td>\n      <td>...</td>\n      <td>-0.145009</td>\n      <td>-0.047750</td>\n      <td>0.278520</td>\n      <td>0.331577</td>\n      <td>0.858669</td>\n      <td>0.048368</td>\n      <td>0.335390</td>\n      <td>0.466354</td>\n      <td>0.213396</td>\n      <td>0.413803</td>\n    </tr>\n    <tr>\n      <th>x8</th>\n      <td>0.888708</td>\n      <td>0.882523</td>\n      <td>0.673552</td>\n      <td>0.522817</td>\n      <td>0.037903</td>\n      <td>-0.044440</td>\n      <td>0.919347</td>\n      <td>0.299498</td>\n      <td>0.766214</td>\n      <td>0.783164</td>\n      <td>...</td>\n      <td>-0.004438</td>\n      <td>0.995500</td>\n      <td>0.833201</td>\n      <td>0.679447</td>\n      <td>-0.014757</td>\n      <td>0.909956</td>\n      <td>0.662584</td>\n      <td>0.560468</td>\n      <td>0.477554</td>\n      <td>-0.266231</td>\n    </tr>\n    <tr>\n      <th>x9</th>\n      <td>0.884198</td>\n      <td>0.869942</td>\n      <td>0.665439</td>\n      <td>0.534159</td>\n      <td>0.046156</td>\n      <td>-0.045471</td>\n      <td>0.927701</td>\n      <td>0.250748</td>\n      <td>0.757290</td>\n      <td>0.776652</td>\n      <td>...</td>\n      <td>-0.007178</td>\n      <td>0.989483</td>\n      <td>0.829707</td>\n      <td>0.680407</td>\n      <td>-0.009187</td>\n      <td>0.912402</td>\n      <td>0.663803</td>\n      <td>0.495717</td>\n      <td>0.467253</td>\n      <td>-0.278010</td>\n    </tr>\n    <tr>\n      <th>x9_diff</th>\n      <td>0.350281</td>\n      <td>0.356741</td>\n      <td>0.062441</td>\n      <td>-0.150722</td>\n      <td>-0.315628</td>\n      <td>-0.147350</td>\n      <td>0.409587</td>\n      <td>-0.036596</td>\n      <td>0.179957</td>\n      <td>0.304778</td>\n      <td>...</td>\n      <td>-0.399808</td>\n      <td>0.621386</td>\n      <td>0.195824</td>\n      <td>0.004165</td>\n      <td>-0.396301</td>\n      <td>0.061952</td>\n      <td>-0.304630</td>\n      <td>0.068946</td>\n      <td>0.142771</td>\n      <td>-0.347061</td>\n    </tr>\n    <tr>\n      <th>x9_diff2</th>\n      <td>-0.205355</td>\n      <td>-0.210533</td>\n      <td>-0.532031</td>\n      <td>-0.433543</td>\n      <td>-0.762867</td>\n      <td>-0.563504</td>\n      <td>-0.231088</td>\n      <td>-0.455280</td>\n      <td>-0.457019</td>\n      <td>-0.440930</td>\n      <td>...</td>\n      <td>-0.076557</td>\n      <td>0.001081</td>\n      <td>-0.351474</td>\n      <td>-0.435534</td>\n      <td>-0.798271</td>\n      <td>-0.273802</td>\n      <td>-0.556015</td>\n      <td>-0.431597</td>\n      <td>-0.379767</td>\n      <td>-0.513241</td>\n    </tr>\n    <tr>\n      <th>x91</th>\n      <td>0.882995</td>\n      <td>0.868700</td>\n      <td>0.664003</td>\n      <td>0.533524</td>\n      <td>0.044661</td>\n      <td>-0.046676</td>\n      <td>0.926960</td>\n      <td>0.248433</td>\n      <td>0.755328</td>\n      <td>0.774918</td>\n      <td>...</td>\n      <td>-0.007671</td>\n      <td>0.988949</td>\n      <td>0.828731</td>\n      <td>0.679414</td>\n      <td>-0.010785</td>\n      <td>0.911448</td>\n      <td>0.661376</td>\n      <td>0.494570</td>\n      <td>0.467761</td>\n      <td>-0.277651</td>\n    </tr>\n    <tr>\n      <th>x92</th>\n      <td>0.809329</td>\n      <td>0.828274</td>\n      <td>0.592825</td>\n      <td>0.395896</td>\n      <td>0.003571</td>\n      <td>-0.062456</td>\n      <td>0.766218</td>\n      <td>0.404694</td>\n      <td>0.697472</td>\n      <td>0.725837</td>\n      <td>...</td>\n      <td>0.035306</td>\n      <td>0.890346</td>\n      <td>0.732714</td>\n      <td>0.575261</td>\n      <td>-0.035222</td>\n      <td>0.756537</td>\n      <td>0.530460</td>\n      <td>0.667444</td>\n      <td>0.428952</td>\n      <td>-0.197344</td>\n    </tr>\n    <tr>\n      <th>x10</th>\n      <td>0.169906</td>\n      <td>0.094849</td>\n      <td>0.105448</td>\n      <td>0.593632</td>\n      <td>-0.006523</td>\n      <td>-0.159275</td>\n      <td>0.251570</td>\n      <td>-0.401171</td>\n      <td>0.064231</td>\n      <td>-0.096023</td>\n      <td>...</td>\n      <td>0.328311</td>\n      <td>0.095224</td>\n      <td>0.277618</td>\n      <td>0.390712</td>\n      <td>-0.020941</td>\n      <td>0.594715</td>\n      <td>0.523495</td>\n      <td>-0.328226</td>\n      <td>-0.239530</td>\n      <td>-0.449734</td>\n    </tr>\n    <tr>\n      <th>x11</th>\n      <td>-0.660263</td>\n      <td>-0.620816</td>\n      <td>-0.536675</td>\n      <td>-0.538187</td>\n      <td>-0.207949</td>\n      <td>-0.098575</td>\n      <td>-0.802547</td>\n      <td>0.050886</td>\n      <td>-0.585804</td>\n      <td>-0.573885</td>\n      <td>...</td>\n      <td>0.121980</td>\n      <td>-0.794770</td>\n      <td>-0.690305</td>\n      <td>-0.576605</td>\n      <td>-0.112912</td>\n      <td>-0.819430</td>\n      <td>-0.631217</td>\n      <td>-0.273053</td>\n      <td>-0.339985</td>\n      <td>0.275326</td>\n    </tr>\n    <tr>\n      <th>x12</th>\n      <td>0.865163</td>\n      <td>0.850585</td>\n      <td>0.548115</td>\n      <td>0.477689</td>\n      <td>-0.109171</td>\n      <td>-0.120435</td>\n      <td>0.855144</td>\n      <td>0.152286</td>\n      <td>0.662419</td>\n      <td>0.672059</td>\n      <td>...</td>\n      <td>0.006675</td>\n      <td>0.962006</td>\n      <td>0.785559</td>\n      <td>0.635660</td>\n      <td>-0.133192</td>\n      <td>0.874502</td>\n      <td>0.553610</td>\n      <td>0.422959</td>\n      <td>0.359779</td>\n      <td>-0.379973</td>\n    </tr>\n    <tr>\n      <th>x13</th>\n      <td>0.678950</td>\n      <td>0.624426</td>\n      <td>0.388317</td>\n      <td>0.471074</td>\n      <td>-0.107831</td>\n      <td>-0.121070</td>\n      <td>0.721727</td>\n      <td>-0.064359</td>\n      <td>0.483212</td>\n      <td>0.456929</td>\n      <td>...</td>\n      <td>0.009957</td>\n      <td>0.748132</td>\n      <td>0.624930</td>\n      <td>0.541320</td>\n      <td>-0.123159</td>\n      <td>0.836118</td>\n      <td>0.533997</td>\n      <td>0.057728</td>\n      <td>0.301564</td>\n      <td>-0.314538</td>\n    </tr>\n    <tr>\n      <th>x14</th>\n      <td>0.381077</td>\n      <td>0.379794</td>\n      <td>0.317395</td>\n      <td>0.023229</td>\n      <td>0.007067</td>\n      <td>-0.146926</td>\n      <td>0.342366</td>\n      <td>0.153989</td>\n      <td>0.356727</td>\n      <td>0.445107</td>\n      <td>...</td>\n      <td>0.177494</td>\n      <td>0.339526</td>\n      <td>0.258670</td>\n      <td>0.177667</td>\n      <td>0.074282</td>\n      <td>0.421727</td>\n      <td>0.406654</td>\n      <td>0.175972</td>\n      <td>0.456191</td>\n      <td>0.237626</td>\n    </tr>\n    <tr>\n      <th>x15</th>\n      <td>0.898694</td>\n      <td>0.889759</td>\n      <td>0.655016</td>\n      <td>0.509648</td>\n      <td>-0.006284</td>\n      <td>-0.071595</td>\n      <td>0.913773</td>\n      <td>0.283760</td>\n      <td>0.760346</td>\n      <td>0.772459</td>\n      <td>...</td>\n      <td>0.022696</td>\n      <td>0.993976</td>\n      <td>0.829150</td>\n      <td>0.678349</td>\n      <td>-0.046469</td>\n      <td>0.924449</td>\n      <td>0.641415</td>\n      <td>0.532277</td>\n      <td>0.473155</td>\n      <td>-0.274338</td>\n    </tr>\n    <tr>\n      <th>x16</th>\n      <td>-0.646232</td>\n      <td>-0.619339</td>\n      <td>-0.535443</td>\n      <td>-0.432585</td>\n      <td>-0.230174</td>\n      <td>-0.144115</td>\n      <td>-0.783739</td>\n      <td>-0.025366</td>\n      <td>-0.596214</td>\n      <td>-0.619416</td>\n      <td>...</td>\n      <td>0.211496</td>\n      <td>-0.807402</td>\n      <td>-0.655793</td>\n      <td>-0.509763</td>\n      <td>-0.129055</td>\n      <td>-0.765616</td>\n      <td>-0.581007</td>\n      <td>-0.345742</td>\n      <td>-0.416922</td>\n      <td>0.180806</td>\n    </tr>\n    <tr>\n      <th>x16_diff</th>\n      <td>0.218947</td>\n      <td>0.208010</td>\n      <td>0.323122</td>\n      <td>0.420439</td>\n      <td>-0.002174</td>\n      <td>-0.412504</td>\n      <td>0.123814</td>\n      <td>0.162007</td>\n      <td>0.247885</td>\n      <td>0.123259</td>\n      <td>...</td>\n      <td>0.992972</td>\n      <td>-0.072301</td>\n      <td>0.240440</td>\n      <td>0.396026</td>\n      <td>0.108443</td>\n      <td>0.288774</td>\n      <td>0.449076</td>\n      <td>0.104370</td>\n      <td>0.110520</td>\n      <td>0.111528</td>\n    </tr>\n    <tr>\n      <th>x17</th>\n      <td>0.895980</td>\n      <td>0.883057</td>\n      <td>0.642457</td>\n      <td>0.516960</td>\n      <td>-0.015783</td>\n      <td>-0.080059</td>\n      <td>0.912863</td>\n      <td>0.250502</td>\n      <td>0.747475</td>\n      <td>0.757186</td>\n      <td>...</td>\n      <td>0.025562</td>\n      <td>0.989864</td>\n      <td>0.827108</td>\n      <td>0.679485</td>\n      <td>-0.054316</td>\n      <td>0.923133</td>\n      <td>0.636884</td>\n      <td>0.499401</td>\n      <td>0.458159</td>\n      <td>-0.291239</td>\n    </tr>\n    <tr>\n      <th>x17_diff</th>\n      <td>0.450071</td>\n      <td>0.445067</td>\n      <td>0.190234</td>\n      <td>0.211453</td>\n      <td>-0.392083</td>\n      <td>-0.504001</td>\n      <td>0.262555</td>\n      <td>0.031135</td>\n      <td>0.264869</td>\n      <td>0.191158</td>\n      <td>...</td>\n      <td>0.686057</td>\n      <td>0.280751</td>\n      <td>0.320687</td>\n      <td>0.345180</td>\n      <td>-0.227674</td>\n      <td>0.408305</td>\n      <td>0.268622</td>\n      <td>0.145282</td>\n      <td>0.220461</td>\n      <td>-0.027962</td>\n    </tr>\n    <tr>\n      <th>x167</th>\n      <td>-0.322776</td>\n      <td>-0.297346</td>\n      <td>-0.343835</td>\n      <td>-0.242336</td>\n      <td>-0.358879</td>\n      <td>-0.285743</td>\n      <td>-0.511433</td>\n      <td>0.097599</td>\n      <td>-0.363973</td>\n      <td>-0.402970</td>\n      <td>...</td>\n      <td>0.362615</td>\n      <td>-0.503742</td>\n      <td>-0.378465</td>\n      <td>-0.255123</td>\n      <td>-0.231427</td>\n      <td>-0.578285</td>\n      <td>-0.469120</td>\n      <td>-0.192066</td>\n      <td>-0.320223</td>\n      <td>0.033385</td>\n    </tr>\n    <tr>\n      <th>x167_diff</th>\n      <td>0.280933</td>\n      <td>0.270065</td>\n      <td>0.333257</td>\n      <td>0.425019</td>\n      <td>-0.053597</td>\n      <td>-0.446675</td>\n      <td>0.170101</td>\n      <td>0.143374</td>\n      <td>0.276664</td>\n      <td>0.155846</td>\n      <td>...</td>\n      <td>1.000000</td>\n      <td>-0.004699</td>\n      <td>0.283076</td>\n      <td>0.423058</td>\n      <td>0.070441</td>\n      <td>0.346332</td>\n      <td>0.467926</td>\n      <td>0.123773</td>\n      <td>0.134227</td>\n      <td>0.083656</td>\n    </tr>\n    <tr>\n      <th>x18</th>\n      <td>0.898700</td>\n      <td>0.895502</td>\n      <td>0.677097</td>\n      <td>0.500057</td>\n      <td>0.025227</td>\n      <td>-0.050775</td>\n      <td>0.917577</td>\n      <td>0.335624</td>\n      <td>0.777808</td>\n      <td>0.804822</td>\n      <td>...</td>\n      <td>-0.004699</td>\n      <td>1.000000</td>\n      <td>0.830018</td>\n      <td>0.669929</td>\n      <td>-0.019793</td>\n      <td>0.917310</td>\n      <td>0.665465</td>\n      <td>0.568496</td>\n      <td>0.488473</td>\n      <td>-0.250634</td>\n    </tr>\n    <tr>\n      <th>x19</th>\n      <td>0.948842</td>\n      <td>0.939483</td>\n      <td>0.910957</td>\n      <td>0.839345</td>\n      <td>0.400167</td>\n      <td>0.179438</td>\n      <td>0.937463</td>\n      <td>0.439544</td>\n      <td>0.914991</td>\n      <td>0.884795</td>\n      <td>...</td>\n      <td>0.283076</td>\n      <td>0.830018</td>\n      <td>1.000000</td>\n      <td>0.961283</td>\n      <td>0.446126</td>\n      <td>0.903906</td>\n      <td>0.918034</td>\n      <td>0.688097</td>\n      <td>0.469144</td>\n      <td>-0.099290</td>\n    </tr>\n    <tr>\n      <th>x20</th>\n      <td>0.872758</td>\n      <td>0.855346</td>\n      <td>0.913284</td>\n      <td>0.920416</td>\n      <td>0.475905</td>\n      <td>0.190152</td>\n      <td>0.861737</td>\n      <td>0.435211</td>\n      <td>0.863470</td>\n      <td>0.807233</td>\n      <td>...</td>\n      <td>0.423058</td>\n      <td>0.669929</td>\n      <td>0.961283</td>\n      <td>1.000000</td>\n      <td>0.547298</td>\n      <td>0.817630</td>\n      <td>0.889677</td>\n      <td>0.615682</td>\n      <td>0.419467</td>\n      <td>-0.034051</td>\n    </tr>\n    <tr>\n      <th>x20_diff</th>\n      <td>0.263149</td>\n      <td>0.264696</td>\n      <td>0.609664</td>\n      <td>0.504985</td>\n      <td>0.931463</td>\n      <td>0.800653</td>\n      <td>0.257120</td>\n      <td>0.339432</td>\n      <td>0.496042</td>\n      <td>0.483494</td>\n      <td>...</td>\n      <td>0.070441</td>\n      <td>-0.019793</td>\n      <td>0.446126</td>\n      <td>0.547298</td>\n      <td>1.000000</td>\n      <td>0.317726</td>\n      <td>0.645431</td>\n      <td>0.503202</td>\n      <td>0.261581</td>\n      <td>0.428928</td>\n    </tr>\n    <tr>\n      <th>x21</th>\n      <td>0.956218</td>\n      <td>0.950800</td>\n      <td>0.650086</td>\n      <td>0.687633</td>\n      <td>0.272901</td>\n      <td>0.059903</td>\n      <td>0.921197</td>\n      <td>-0.151045</td>\n      <td>0.732715</td>\n      <td>0.665036</td>\n      <td>...</td>\n      <td>0.346332</td>\n      <td>0.917310</td>\n      <td>0.903906</td>\n      <td>0.817630</td>\n      <td>0.317726</td>\n      <td>1.000000</td>\n      <td>0.841239</td>\n      <td>0.155048</td>\n      <td>0.319815</td>\n      <td>-0.088356</td>\n    </tr>\n    <tr>\n      <th>x22</th>\n      <td>0.898867</td>\n      <td>0.893085</td>\n      <td>0.863120</td>\n      <td>0.831350</td>\n      <td>0.598199</td>\n      <td>0.247567</td>\n      <td>0.857974</td>\n      <td>0.177394</td>\n      <td>0.901757</td>\n      <td>0.808383</td>\n      <td>...</td>\n      <td>0.467926</td>\n      <td>0.665465</td>\n      <td>0.918034</td>\n      <td>0.889677</td>\n      <td>0.645431</td>\n      <td>0.841239</td>\n      <td>1.000000</td>\n      <td>0.439316</td>\n      <td>0.348663</td>\n      <td>0.094279</td>\n    </tr>\n    <tr>\n      <th>x23</th>\n      <td>0.654395</td>\n      <td>0.706583</td>\n      <td>0.735980</td>\n      <td>0.413391</td>\n      <td>0.404722</td>\n      <td>0.331983</td>\n      <td>0.572576</td>\n      <td>0.703473</td>\n      <td>0.753741</td>\n      <td>0.764234</td>\n      <td>...</td>\n      <td>0.123773</td>\n      <td>0.568496</td>\n      <td>0.688097</td>\n      <td>0.615682</td>\n      <td>0.503202</td>\n      <td>0.155048</td>\n      <td>0.439316</td>\n      <td>1.000000</td>\n      <td>0.553158</td>\n      <td>0.295716</td>\n    </tr>\n    <tr>\n      <th>x24</th>\n      <td>0.554079</td>\n      <td>0.551368</td>\n      <td>0.542622</td>\n      <td>0.228821</td>\n      <td>0.250956</td>\n      <td>0.169987</td>\n      <td>0.492865</td>\n      <td>0.484554</td>\n      <td>0.621022</td>\n      <td>0.615016</td>\n      <td>...</td>\n      <td>0.134227</td>\n      <td>0.488473</td>\n      <td>0.469144</td>\n      <td>0.419467</td>\n      <td>0.261581</td>\n      <td>0.319815</td>\n      <td>0.348663</td>\n      <td>0.553158</td>\n      <td>1.000000</td>\n      <td>0.704588</td>\n    </tr>\n    <tr>\n      <th>x24_diff</th>\n      <td>-0.078502</td>\n      <td>-0.073120</td>\n      <td>0.131413</td>\n      <td>-0.150161</td>\n      <td>0.357223</td>\n      <td>0.362603</td>\n      <td>-0.172458</td>\n      <td>0.391596</td>\n      <td>0.130866</td>\n      <td>0.117953</td>\n      <td>...</td>\n      <td>0.083656</td>\n      <td>-0.250634</td>\n      <td>-0.099290</td>\n      <td>-0.034051</td>\n      <td>0.428928</td>\n      <td>-0.088356</td>\n      <td>0.094279</td>\n      <td>0.295716</td>\n      <td>0.704588</td>\n      <td>1.000000</td>\n    </tr>\n  </tbody>\n</table>\n<p>44 rows × 44 columns</p>\n</div>"
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[:-1].corr()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "          x1  x44_diff  x9_diff2  x17_diff       x18\n0   6.266041  0.010400  0.021000 -0.007049  5.390033\n1   6.513495 -0.006385 -0.006025 -0.021714  5.394162\n2   6.553665  0.114004 -0.010009  0.004386  5.426798\n3   6.543770  0.025117  0.004026  0.069951  5.458402\n4   6.267120 -0.237752  0.014247  0.031023  5.489038\n5   6.534001  0.231259 -0.009224 -0.027410  5.518763\n6   6.526775  0.008927 -0.010917  0.015334  5.547630\n7   6.530887  0.046838 -0.004766  0.024128  5.575687\n8   6.310605 -0.256992  0.027363  0.002474  5.602978\n9   6.569595  0.273893 -0.027591 -0.003165  5.629544\n10  6.585332 -0.019686  0.004710  0.014211  5.657070\n11  6.650938  0.101963  0.001682  0.036263  5.685460\n12  6.403112 -0.226082  0.015791  0.013545  5.713065\n13  6.628625  0.279442 -0.004395 -0.003725  5.739930\n14  6.719548 -0.000560 -0.002797  0.014955  5.770498\n15  6.681085 -0.014673 -0.000203  0.056331  5.804419\n16  6.454557 -0.163289  0.017288  0.038203  5.837227\n17  6.722089  0.254177 -0.004968 -0.007232  5.868993\n18  6.780542  0.007818  0.011884  0.008264  5.905246\n19  6.721266  0.026715 -0.006967  0.033061  5.945481\n20  6.478617 -0.186620  0.008312  0.030851  5.984159\n21  6.710568  0.219973 -0.016889 -0.003572  6.021397\n22  6.792549  0.009465  0.002990  0.003052  6.052049\n23  6.780160  0.016230 -0.002557  0.055824  6.076667\n24  6.261448 -0.483183  0.024141  0.020853  6.100694\n25  6.771893  0.462815 -0.006097 -0.009326  6.124157\n26  6.856591  0.069467 -0.012176  0.034881  6.153309\n27  6.859935  0.028781 -0.009620  0.067786  6.187652\n28  6.660558 -0.278589  0.021776  0.020426  6.220854\n29  6.890753  0.291362 -0.012233 -0.004163  6.252989\n30  6.956559 -0.009933 -0.004493  0.027561  6.285659\n31  6.860005 -0.018851 -0.005903  0.046391  6.318780\n32  6.719769 -0.228347  0.022854  0.027083  6.350839\n33  6.811531  0.146983 -0.005595  0.017651  6.375112",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>x1</th>\n      <th>x44_diff</th>\n      <th>x9_diff2</th>\n      <th>x17_diff</th>\n      <th>x18</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>6.266041</td>\n      <td>0.010400</td>\n      <td>0.021000</td>\n      <td>-0.007049</td>\n      <td>5.390033</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>6.513495</td>\n      <td>-0.006385</td>\n      <td>-0.006025</td>\n      <td>-0.021714</td>\n      <td>5.394162</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>6.553665</td>\n      <td>0.114004</td>\n      <td>-0.010009</td>\n      <td>0.004386</td>\n      <td>5.426798</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>6.543770</td>\n      <td>0.025117</td>\n      <td>0.004026</td>\n      <td>0.069951</td>\n      <td>5.458402</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>6.267120</td>\n      <td>-0.237752</td>\n      <td>0.014247</td>\n      <td>0.031023</td>\n      <td>5.489038</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>6.534001</td>\n      <td>0.231259</td>\n      <td>-0.009224</td>\n      <td>-0.027410</td>\n      <td>5.518763</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>6.526775</td>\n      <td>0.008927</td>\n      <td>-0.010917</td>\n      <td>0.015334</td>\n      <td>5.547630</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>6.530887</td>\n      <td>0.046838</td>\n      <td>-0.004766</td>\n      <td>0.024128</td>\n      <td>5.575687</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>6.310605</td>\n      <td>-0.256992</td>\n      <td>0.027363</td>\n      <td>0.002474</td>\n      <td>5.602978</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>6.569595</td>\n      <td>0.273893</td>\n      <td>-0.027591</td>\n      <td>-0.003165</td>\n      <td>5.629544</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>6.585332</td>\n      <td>-0.019686</td>\n      <td>0.004710</td>\n      <td>0.014211</td>\n      <td>5.657070</td>\n    </tr>\n    <tr>\n      <th>11</th>\n      <td>6.650938</td>\n      <td>0.101963</td>\n      <td>0.001682</td>\n      <td>0.036263</td>\n      <td>5.685460</td>\n    </tr>\n    <tr>\n      <th>12</th>\n      <td>6.403112</td>\n      <td>-0.226082</td>\n      <td>0.015791</td>\n      <td>0.013545</td>\n      <td>5.713065</td>\n    </tr>\n    <tr>\n      <th>13</th>\n      <td>6.628625</td>\n      <td>0.279442</td>\n      <td>-0.004395</td>\n      <td>-0.003725</td>\n      <td>5.739930</td>\n    </tr>\n    <tr>\n      <th>14</th>\n      <td>6.719548</td>\n      <td>-0.000560</td>\n      <td>-0.002797</td>\n      <td>0.014955</td>\n      <td>5.770498</td>\n    </tr>\n    <tr>\n      <th>15</th>\n      <td>6.681085</td>\n      <td>-0.014673</td>\n      <td>-0.000203</td>\n      <td>0.056331</td>\n      <td>5.804419</td>\n    </tr>\n    <tr>\n      <th>16</th>\n      <td>6.454557</td>\n      <td>-0.163289</td>\n      <td>0.017288</td>\n      <td>0.038203</td>\n      <td>5.837227</td>\n    </tr>\n    <tr>\n      <th>17</th>\n      <td>6.722089</td>\n      <td>0.254177</td>\n      <td>-0.004968</td>\n      <td>-0.007232</td>\n      <td>5.868993</td>\n    </tr>\n    <tr>\n      <th>18</th>\n      <td>6.780542</td>\n      <td>0.007818</td>\n      <td>0.011884</td>\n      <td>0.008264</td>\n      <td>5.905246</td>\n    </tr>\n    <tr>\n      <th>19</th>\n      <td>6.721266</td>\n      <td>0.026715</td>\n      <td>-0.006967</td>\n      <td>0.033061</td>\n      <td>5.945481</td>\n    </tr>\n    <tr>\n      <th>20</th>\n      <td>6.478617</td>\n      <td>-0.186620</td>\n      <td>0.008312</td>\n      <td>0.030851</td>\n      <td>5.984159</td>\n    </tr>\n    <tr>\n      <th>21</th>\n      <td>6.710568</td>\n      <td>0.219973</td>\n      <td>-0.016889</td>\n      <td>-0.003572</td>\n      <td>6.021397</td>\n    </tr>\n    <tr>\n      <th>22</th>\n      <td>6.792549</td>\n      <td>0.009465</td>\n      <td>0.002990</td>\n      <td>0.003052</td>\n      <td>6.052049</td>\n    </tr>\n    <tr>\n      <th>23</th>\n      <td>6.780160</td>\n      <td>0.016230</td>\n      <td>-0.002557</td>\n      <td>0.055824</td>\n      <td>6.076667</td>\n    </tr>\n    <tr>\n      <th>24</th>\n      <td>6.261448</td>\n      <td>-0.483183</td>\n      <td>0.024141</td>\n      <td>0.020853</td>\n      <td>6.100694</td>\n    </tr>\n    <tr>\n      <th>25</th>\n      <td>6.771893</td>\n      <td>0.462815</td>\n      <td>-0.006097</td>\n      <td>-0.009326</td>\n      <td>6.124157</td>\n    </tr>\n    <tr>\n      <th>26</th>\n      <td>6.856591</td>\n      <td>0.069467</td>\n      <td>-0.012176</td>\n      <td>0.034881</td>\n      <td>6.153309</td>\n    </tr>\n    <tr>\n      <th>27</th>\n      <td>6.859935</td>\n      <td>0.028781</td>\n      <td>-0.009620</td>\n      <td>0.067786</td>\n      <td>6.187652</td>\n    </tr>\n    <tr>\n      <th>28</th>\n      <td>6.660558</td>\n      <td>-0.278589</td>\n      <td>0.021776</td>\n      <td>0.020426</td>\n      <td>6.220854</td>\n    </tr>\n    <tr>\n      <th>29</th>\n      <td>6.890753</td>\n      <td>0.291362</td>\n      <td>-0.012233</td>\n      <td>-0.004163</td>\n      <td>6.252989</td>\n    </tr>\n    <tr>\n      <th>30</th>\n      <td>6.956559</td>\n      <td>-0.009933</td>\n      <td>-0.004493</td>\n      <td>0.027561</td>\n      <td>6.285659</td>\n    </tr>\n    <tr>\n      <th>31</th>\n      <td>6.860005</td>\n      <td>-0.018851</td>\n      <td>-0.005903</td>\n      <td>0.046391</td>\n      <td>6.318780</td>\n    </tr>\n    <tr>\n      <th>32</th>\n      <td>6.719769</td>\n      <td>-0.228347</td>\n      <td>0.022854</td>\n      <td>0.027083</td>\n      <td>6.350839</td>\n    </tr>\n    <tr>\n      <th>33</th>\n      <td>6.811531</td>\n      <td>0.146983</td>\n      <td>-0.005595</td>\n      <td>0.017651</td>\n      <td>6.375112</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = df[['x1', 'x44_diff', 'x9_diff2', 'x17_diff', 'x18']].dropna()\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def vif(df,col_i):\n",
    "    '''\n",
    "    :param df: 整份数据\n",
    "    :param col_i: 被检测的因子\n",
    "    :return:方差膨胀因子\n",
    "    '''\n",
    "    cols=list(df.columns)\n",
    "    cols.remove(col_i)\n",
    "    formula=col_i+'~'+'+'.join(cols)\n",
    "    r2=ols(formula,df).fit().rsquared\n",
    "    return 1./(1.-r2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "3.149097551980286"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vif(data, 'x18')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "         date           GDP         y        x1        x2   x2_diff  x2_diff2  \\\n0  2014-03-01   8173.549149  9.008659  6.266041  7.826730  0.003800  0.120600   \n1  2014-06-01   9809.436579  9.191100  6.513495  8.049318  0.222588  0.218788   \n2  2014-09-01   9980.577105  9.208396  6.553665  8.056709  0.007390 -0.215198   \n3  2014-12-01  12059.917551  9.397643  6.543770  8.066490  0.009781  0.002391   \n4  2015-03-01   9221.739669  9.129319  6.267120  7.838667 -0.227823 -0.237605   \n5  2015-06-01  10354.088209  9.245137  6.534001  8.007017  0.168351  0.396174   \n6  2015-09-01  10161.038862  9.226316  6.526775  8.012157  0.005140 -0.163211   \n7  2015-12-01  13770.853260  9.530310  6.530887  8.036984  0.024827  0.019687   \n8  2016-03-01   9862.022036  9.196447  6.310605  7.834915 -0.202069 -0.226896   \n9  2016-06-01  11269.368323  9.329844  6.569595  8.020708  0.185793  0.387862   \n10 2016-09-01  10998.155661  9.305483  6.585332  8.022890  0.002183 -0.183610   \n11 2016-12-01  15124.493979  9.624071  6.650938  8.069151  0.046261  0.044078   \n12 2017-03-01  11260.527043  9.329059  6.403112  7.924040 -0.145112 -0.191373   \n13 2017-06-01  12820.923272  9.458834  6.628625  8.130162  0.206122  0.351234   \n14 2017-09-01  12576.905083  9.439617  6.719548  8.110193 -0.019969 -0.226092   \n15 2017-12-01  15744.774602  9.664264  6.681085  8.063217 -0.046976 -0.027006   \n16 2018-03-01  12500.904859  9.433556  6.454557  7.815691 -0.247526 -0.200550   \n17 2018-06-01  14024.959955  9.548594  6.722089  7.966795  0.151104  0.398630   \n18 2018-09-01  14797.511808  9.602214  6.780542  8.057377  0.090583 -0.060521   \n19 2018-12-01  16679.463378  9.721934  6.721266  8.052105 -0.005272 -0.095855   \n20 2019-03-01  13746.208200  9.528518  6.478617  7.895250 -0.156856 -0.151584   \n21 2019-06-01  15291.328500  9.635041  6.710568  8.026824  0.131574  0.288429   \n22 2019-09-01  15898.690600  9.673992  6.792549  8.049108  0.022284 -0.109290   \n23 2019-12-01  17525.759000  9.771427  6.780160  8.034048 -0.015060 -0.037344   \n24 2020-03-01  13118.619000  9.481788  6.261448  7.743447 -0.290600 -0.275540   \n25 2020-06-01  15924.495500  9.675614  6.771893  7.977153  0.233706  0.524306   \n26 2020-09-01  16666.081900  9.721131  6.856591  8.107328  0.130175 -0.103531   \n27 2020-12-01  18979.867289  9.851134  6.859935  8.186771  0.079442 -0.050733   \n28 2021-03-01  16273.314400  9.697282  6.660558  8.075925 -0.110846 -0.190288   \n29 2021-06-01  18137.491900  9.805736  6.890753  8.235599  0.159674  0.270520   \n30 2021-09-01  18238.748600  9.811304  6.956559  8.277158  0.041559 -0.118116   \n31 2021-12-01  20866.202800  9.945886  6.860005  8.378069  0.100911  0.059353   \n32 2022-03-01  17886.386900  9.791795  6.719769  8.307953 -0.070117 -0.171028   \n\n          x3       x41        x42  ...  x167_diff       x18       x19  \\\n0   8.442704  8.103404  10.387952  ...  -0.009671  5.390033  7.889545   \n1   8.650919  8.436791  10.209559  ...  -0.042429  5.394162  8.046895   \n2   8.695230  8.430949  10.432081  ...   0.024460  5.426798  8.081899   \n3   8.609951  8.356033  10.457456  ...   0.059248  5.458402  8.164684   \n4   8.471102  8.228746  10.216362  ...  -0.024218  5.489038  7.897363   \n5   8.579945  8.530081  10.447552  ...  -0.059958  5.518763  8.143340   \n6   8.666237  8.507559  10.442440  ...   0.023584  5.547630  8.102465   \n7   8.641887  8.383327  10.518627  ...   0.053201  5.575687  8.232222   \n8   8.425789  8.461419  10.197466  ...  -0.018444  5.602978  7.968240   \n9   8.647810  8.572557  10.548468  ...  -0.049697  5.629544  8.197255   \n10  8.691009  8.658620  10.483231  ...   0.026264  5.657070  8.166745   \n11  8.698181  8.580334  10.636735  ...   0.049818  5.685460  8.286073   \n12  8.629011  8.577826  10.352651  ...  -0.012462  5.713065  8.030145   \n13  8.802603  8.690898  10.685090  ...  -0.036940  5.739930  8.252161   \n14  8.781592  8.750994  10.648255  ...   0.028878  5.770498  8.229591   \n15  8.831691  8.666386  10.665775  ...   0.044971  5.804419  8.331695   \n16  8.734118  8.651823  10.466293  ...  -0.019966  5.837227  8.089194   \n17  8.870484  8.777244  10.718629  ...  -0.037061  5.868993  8.309841   \n18  8.958564  8.839240  10.731633  ...   0.023140  5.905246  8.276681   \n19  8.911270  8.740820  10.771663  ...   0.019946  5.945481  8.358024   \n20  8.800214  8.737684  10.523674  ...  -0.024838  5.984159  8.154385   \n21  8.916509  8.886566  10.776203  ...  -0.052819  6.021397  8.296108   \n22  9.028938  8.948516  10.792899  ...  -0.016012  6.052049  8.320796   \n23  9.036131  8.831396  10.844187  ...   0.016951  6.076667  8.421019   \n24  8.747717  8.069321  10.316623  ...  -0.063459  6.100694  8.063803   \n25  9.040323  8.377218  10.833200  ...  -0.059554  6.124157  8.376650   \n26  9.179623  8.719646  10.917506  ...   0.042132  6.153309  8.391258   \n27  9.149858  8.722346  10.958312  ...   0.038960  6.187652  8.523269   \n28  9.061086  8.468740  10.632316  ...  -0.008099  6.220854  8.388785   \n29  9.265841  8.854006  10.961106  ...  -0.013044  6.252989  8.551038   \n30  9.282531  8.704541  10.992627  ...   0.027543  6.285659  8.547552   \n31  9.347508  8.480760  10.961281  ...   0.027326  6.318780  8.644478   \n32  9.283219  8.268384  10.698489  ...  -0.007372  6.350839  8.578260   \n\n          x20  x20_diff       x21       x22       x23        x24  x24_diff  \n0    9.490387       NaN       NaN       NaN  6.665913   9.066736       NaN  \n1    9.708583  0.218197       NaN       NaN  6.835378   9.182548  0.115812  \n2    9.722591  0.014007       NaN       NaN  7.107163   9.247077  0.064530  \n3    9.798750  0.076159       NaN       NaN  7.462094   9.315457  0.068380  \n4    9.510760 -0.287990       NaN       NaN  6.805357   9.108839 -0.206618  \n5    9.716409  0.205649       NaN       NaN  7.416547   9.278149  0.169309  \n6    9.695342 -0.021067       NaN       NaN  7.335451   9.276381 -0.001768  \n7    9.809727  0.114386       NaN       NaN  7.542017   9.339903  0.063522  \n8    9.537685 -0.272043       NaN       NaN  7.300041   9.143335 -0.196568  \n9    9.752299  0.214615       NaN       NaN  7.769953   9.324704  0.181369  \n10   9.737975 -0.014325       NaN       NaN  7.759222   9.336286  0.011581  \n11   9.863012  0.125038       NaN       NaN  7.801792   9.522549  0.186264  \n12   9.613852 -0.249161  7.885946  7.803159  7.521296   9.363345 -0.159205  \n13   9.789056  0.175204  8.065793  8.065802  7.939562   9.519962  0.156618  \n14   9.778969 -0.010087  8.092857  8.050795  7.727623   9.552717  0.032754  \n15   9.891021  0.112052  8.336537  8.087275  7.892224   9.510778 -0.041938  \n16   9.657499 -0.233523  8.105646  7.719520  7.532666   9.518847  0.008068  \n17   9.814157  0.156659  8.222285  7.893353  8.045229   9.669763  0.150917  \n18   9.811521 -0.002636  8.160084  8.023069  7.706968   9.686991  0.017227  \n19   9.903152  0.091630  8.414243  8.111863  7.841788   9.741804  0.054813  \n20   9.675966 -0.227186  8.247914  7.836903  7.388989   9.702099 -0.039704  \n21   9.769750  0.093785  8.340358  8.101902  7.960844   9.814525  0.112426  \n22   9.806156  0.036405  8.339365  8.205513  7.765238   9.364262 -0.450263  \n23   9.894765  0.088609  8.714331  8.340391  7.838552  10.209497  0.845234  \n24   9.481710 -0.413054  8.308963  7.761259  7.205412   9.602376 -0.607121  \n25   9.841165  0.359455  8.531676  8.234806  8.071109   9.984740  0.382365  \n26   9.890580  0.049414  8.606465  8.187835  7.874804  10.040271  0.055531  \n27  10.015731  0.125151  8.858408  8.465818  8.030338  10.159141  0.118870  \n28   9.858825 -0.156906  8.651983  8.107396  7.863621  10.073365 -0.085776  \n29  10.051520  0.192695  8.772798  8.342526  8.158456  10.298673  0.225308  \n30  10.060004  0.008484  8.795129  8.321944  7.617351  10.252133 -0.046540  \n31  10.153752  0.093748  9.005747  8.465016  7.530357  10.330381  0.078248  \n32  10.037280 -0.116472  8.783024  8.228220  7.394462   7.859645 -2.470736  \n\n[33 rows x 45 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>date</th>\n      <th>GDP</th>\n      <th>y</th>\n      <th>x1</th>\n      <th>x2</th>\n      <th>x2_diff</th>\n      <th>x2_diff2</th>\n      <th>x3</th>\n      <th>x41</th>\n      <th>x42</th>\n      <th>...</th>\n      <th>x167_diff</th>\n      <th>x18</th>\n      <th>x19</th>\n      <th>x20</th>\n      <th>x20_diff</th>\n      <th>x21</th>\n      <th>x22</th>\n      <th>x23</th>\n      <th>x24</th>\n      <th>x24_diff</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2014-03-01</td>\n      <td>8173.549149</td>\n      <td>9.008659</td>\n      <td>6.266041</td>\n      <td>7.826730</td>\n      <td>0.003800</td>\n      <td>0.120600</td>\n      <td>8.442704</td>\n      <td>8.103404</td>\n      <td>10.387952</td>\n      <td>...</td>\n      <td>-0.009671</td>\n      <td>5.390033</td>\n      <td>7.889545</td>\n      <td>9.490387</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.665913</td>\n      <td>9.066736</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2014-06-01</td>\n      <td>9809.436579</td>\n      <td>9.191100</td>\n      <td>6.513495</td>\n      <td>8.049318</td>\n      <td>0.222588</td>\n      <td>0.218788</td>\n      <td>8.650919</td>\n      <td>8.436791</td>\n      <td>10.209559</td>\n      <td>...</td>\n      <td>-0.042429</td>\n      <td>5.394162</td>\n      <td>8.046895</td>\n      <td>9.708583</td>\n      <td>0.218197</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.835378</td>\n      <td>9.182548</td>\n      <td>0.115812</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2014-09-01</td>\n      <td>9980.577105</td>\n      <td>9.208396</td>\n      <td>6.553665</td>\n      <td>8.056709</td>\n      <td>0.007390</td>\n      <td>-0.215198</td>\n      <td>8.695230</td>\n      <td>8.430949</td>\n      <td>10.432081</td>\n      <td>...</td>\n      <td>0.024460</td>\n      <td>5.426798</td>\n      <td>8.081899</td>\n      <td>9.722591</td>\n      <td>0.014007</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.107163</td>\n      <td>9.247077</td>\n      <td>0.064530</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2014-12-01</td>\n      <td>12059.917551</td>\n      <td>9.397643</td>\n      <td>6.543770</td>\n      <td>8.066490</td>\n      <td>0.009781</td>\n      <td>0.002391</td>\n      <td>8.609951</td>\n      <td>8.356033</td>\n      <td>10.457456</td>\n      <td>...</td>\n      <td>0.059248</td>\n      <td>5.458402</td>\n      <td>8.164684</td>\n      <td>9.798750</td>\n      <td>0.076159</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.462094</td>\n      <td>9.315457</td>\n      <td>0.068380</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2015-03-01</td>\n      <td>9221.739669</td>\n      <td>9.129319</td>\n      <td>6.267120</td>\n      <td>7.838667</td>\n      <td>-0.227823</td>\n      <td>-0.237605</td>\n      <td>8.471102</td>\n      <td>8.228746</td>\n      <td>10.216362</td>\n      <td>...</td>\n      <td>-0.024218</td>\n      <td>5.489038</td>\n      <td>7.897363</td>\n      <td>9.510760</td>\n      <td>-0.287990</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>6.805357</td>\n      <td>9.108839</td>\n      <td>-0.206618</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>2015-06-01</td>\n      <td>10354.088209</td>\n      <td>9.245137</td>\n      <td>6.534001</td>\n      <td>8.007017</td>\n      <td>0.168351</td>\n      <td>0.396174</td>\n      <td>8.579945</td>\n      <td>8.530081</td>\n      <td>10.447552</td>\n      <td>...</td>\n      <td>-0.059958</td>\n      <td>5.518763</td>\n      <td>8.143340</td>\n      <td>9.716409</td>\n      <td>0.205649</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.416547</td>\n      <td>9.278149</td>\n      <td>0.169309</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>2015-09-01</td>\n      <td>10161.038862</td>\n      <td>9.226316</td>\n      <td>6.526775</td>\n      <td>8.012157</td>\n      <td>0.005140</td>\n      <td>-0.163211</td>\n      <td>8.666237</td>\n      <td>8.507559</td>\n      <td>10.442440</td>\n      <td>...</td>\n      <td>0.023584</td>\n      <td>5.547630</td>\n      <td>8.102465</td>\n      <td>9.695342</td>\n      <td>-0.021067</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.335451</td>\n      <td>9.276381</td>\n      <td>-0.001768</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>2015-12-01</td>\n      <td>13770.853260</td>\n      <td>9.530310</td>\n      <td>6.530887</td>\n      <td>8.036984</td>\n      <td>0.024827</td>\n      <td>0.019687</td>\n      <td>8.641887</td>\n      <td>8.383327</td>\n      <td>10.518627</td>\n      <td>...</td>\n      <td>0.053201</td>\n      <td>5.575687</td>\n      <td>8.232222</td>\n      <td>9.809727</td>\n      <td>0.114386</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.542017</td>\n      <td>9.339903</td>\n      <td>0.063522</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>2016-03-01</td>\n      <td>9862.022036</td>\n      <td>9.196447</td>\n      <td>6.310605</td>\n      <td>7.834915</td>\n      <td>-0.202069</td>\n      <td>-0.226896</td>\n      <td>8.425789</td>\n      <td>8.461419</td>\n      <td>10.197466</td>\n      <td>...</td>\n      <td>-0.018444</td>\n      <td>5.602978</td>\n      <td>7.968240</td>\n      <td>9.537685</td>\n      <td>-0.272043</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.300041</td>\n      <td>9.143335</td>\n      <td>-0.196568</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>2016-06-01</td>\n      <td>11269.368323</td>\n      <td>9.329844</td>\n      <td>6.569595</td>\n      <td>8.020708</td>\n      <td>0.185793</td>\n      <td>0.387862</td>\n      <td>8.647810</td>\n      <td>8.572557</td>\n      <td>10.548468</td>\n      <td>...</td>\n      <td>-0.049697</td>\n      <td>5.629544</td>\n      <td>8.197255</td>\n      <td>9.752299</td>\n      <td>0.214615</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.769953</td>\n      <td>9.324704</td>\n      <td>0.181369</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>2016-09-01</td>\n      <td>10998.155661</td>\n      <td>9.305483</td>\n      <td>6.585332</td>\n      <td>8.022890</td>\n      <td>0.002183</td>\n      <td>-0.183610</td>\n      <td>8.691009</td>\n      <td>8.658620</td>\n      <td>10.483231</td>\n      <td>...</td>\n      <td>0.026264</td>\n      <td>5.657070</td>\n      <td>8.166745</td>\n      <td>9.737975</td>\n      <td>-0.014325</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.759222</td>\n      <td>9.336286</td>\n      <td>0.011581</td>\n    </tr>\n    <tr>\n      <th>11</th>\n      <td>2016-12-01</td>\n      <td>15124.493979</td>\n      <td>9.624071</td>\n      <td>6.650938</td>\n      <td>8.069151</td>\n      <td>0.046261</td>\n      <td>0.044078</td>\n      <td>8.698181</td>\n      <td>8.580334</td>\n      <td>10.636735</td>\n      <td>...</td>\n      <td>0.049818</td>\n      <td>5.685460</td>\n      <td>8.286073</td>\n      <td>9.863012</td>\n      <td>0.125038</td>\n      <td>NaN</td>\n      <td>NaN</td>\n      <td>7.801792</td>\n      <td>9.522549</td>\n      <td>0.186264</td>\n    </tr>\n    <tr>\n      <th>12</th>\n      <td>2017-03-01</td>\n      <td>11260.527043</td>\n      <td>9.329059</td>\n      <td>6.403112</td>\n      <td>7.924040</td>\n      <td>-0.145112</td>\n      <td>-0.191373</td>\n      <td>8.629011</td>\n      <td>8.577826</td>\n      <td>10.352651</td>\n      <td>...</td>\n      <td>-0.012462</td>\n      <td>5.713065</td>\n      <td>8.030145</td>\n      <td>9.613852</td>\n      <td>-0.249161</td>\n      <td>7.885946</td>\n      <td>7.803159</td>\n      <td>7.521296</td>\n      <td>9.363345</td>\n      <td>-0.159205</td>\n    </tr>\n    <tr>\n      <th>13</th>\n      <td>2017-06-01</td>\n      <td>12820.923272</td>\n      <td>9.458834</td>\n      <td>6.628625</td>\n      <td>8.130162</td>\n      <td>0.206122</td>\n      <td>0.351234</td>\n      <td>8.802603</td>\n      <td>8.690898</td>\n      <td>10.685090</td>\n      <td>...</td>\n      <td>-0.036940</td>\n      <td>5.739930</td>\n      <td>8.252161</td>\n      <td>9.789056</td>\n      <td>0.175204</td>\n      <td>8.065793</td>\n      <td>8.065802</td>\n      <td>7.939562</td>\n      <td>9.519962</td>\n      <td>0.156618</td>\n    </tr>\n    <tr>\n      <th>14</th>\n      <td>2017-09-01</td>\n      <td>12576.905083</td>\n      <td>9.439617</td>\n      <td>6.719548</td>\n      <td>8.110193</td>\n      <td>-0.019969</td>\n      <td>-0.226092</td>\n      <td>8.781592</td>\n      <td>8.750994</td>\n      <td>10.648255</td>\n      <td>...</td>\n      <td>0.028878</td>\n      <td>5.770498</td>\n      <td>8.229591</td>\n      <td>9.778969</td>\n      <td>-0.010087</td>\n      <td>8.092857</td>\n      <td>8.050795</td>\n      <td>7.727623</td>\n      <td>9.552717</td>\n      <td>0.032754</td>\n    </tr>\n    <tr>\n      <th>15</th>\n      <td>2017-12-01</td>\n      <td>15744.774602</td>\n      <td>9.664264</td>\n      <td>6.681085</td>\n      <td>8.063217</td>\n      <td>-0.046976</td>\n      <td>-0.027006</td>\n      <td>8.831691</td>\n      <td>8.666386</td>\n      <td>10.665775</td>\n      <td>...</td>\n      <td>0.044971</td>\n      <td>5.804419</td>\n      <td>8.331695</td>\n      <td>9.891021</td>\n      <td>0.112052</td>\n      <td>8.336537</td>\n      <td>8.087275</td>\n      <td>7.892224</td>\n      <td>9.510778</td>\n      <td>-0.041938</td>\n    </tr>\n    <tr>\n      <th>16</th>\n      <td>2018-03-01</td>\n      <td>12500.904859</td>\n      <td>9.433556</td>\n      <td>6.454557</td>\n      <td>7.815691</td>\n      <td>-0.247526</td>\n      <td>-0.200550</td>\n      <td>8.734118</td>\n      <td>8.651823</td>\n      <td>10.466293</td>\n      <td>...</td>\n      <td>-0.019966</td>\n      <td>5.837227</td>\n      <td>8.089194</td>\n      <td>9.657499</td>\n      <td>-0.233523</td>\n      <td>8.105646</td>\n      <td>7.719520</td>\n      <td>7.532666</td>\n      <td>9.518847</td>\n      <td>0.008068</td>\n    </tr>\n    <tr>\n      <th>17</th>\n      <td>2018-06-01</td>\n      <td>14024.959955</td>\n      <td>9.548594</td>\n      <td>6.722089</td>\n      <td>7.966795</td>\n      <td>0.151104</td>\n      <td>0.398630</td>\n      <td>8.870484</td>\n      <td>8.777244</td>\n      <td>10.718629</td>\n      <td>...</td>\n      <td>-0.037061</td>\n      <td>5.868993</td>\n      <td>8.309841</td>\n      <td>9.814157</td>\n      <td>0.156659</td>\n      <td>8.222285</td>\n      <td>7.893353</td>\n      <td>8.045229</td>\n      <td>9.669763</td>\n      <td>0.150917</td>\n    </tr>\n    <tr>\n      <th>18</th>\n      <td>2018-09-01</td>\n      <td>14797.511808</td>\n      <td>9.602214</td>\n      <td>6.780542</td>\n      <td>8.057377</td>\n      <td>0.090583</td>\n      <td>-0.060521</td>\n      <td>8.958564</td>\n      <td>8.839240</td>\n      <td>10.731633</td>\n      <td>...</td>\n      <td>0.023140</td>\n      <td>5.905246</td>\n      <td>8.276681</td>\n      <td>9.811521</td>\n      <td>-0.002636</td>\n      <td>8.160084</td>\n      <td>8.023069</td>\n      <td>7.706968</td>\n      <td>9.686991</td>\n      <td>0.017227</td>\n    </tr>\n    <tr>\n      <th>19</th>\n      <td>2018-12-01</td>\n      <td>16679.463378</td>\n      <td>9.721934</td>\n      <td>6.721266</td>\n      <td>8.052105</td>\n      <td>-0.005272</td>\n      <td>-0.095855</td>\n      <td>8.911270</td>\n      <td>8.740820</td>\n      <td>10.771663</td>\n      <td>...</td>\n      <td>0.019946</td>\n      <td>5.945481</td>\n      <td>8.358024</td>\n      <td>9.903152</td>\n      <td>0.091630</td>\n      <td>8.414243</td>\n      <td>8.111863</td>\n      <td>7.841788</td>\n      <td>9.741804</td>\n      <td>0.054813</td>\n    </tr>\n    <tr>\n      <th>20</th>\n      <td>2019-03-01</td>\n      <td>13746.208200</td>\n      <td>9.528518</td>\n      <td>6.478617</td>\n      <td>7.895250</td>\n      <td>-0.156856</td>\n      <td>-0.151584</td>\n      <td>8.800214</td>\n      <td>8.737684</td>\n      <td>10.523674</td>\n      <td>...</td>\n      <td>-0.024838</td>\n      <td>5.984159</td>\n      <td>8.154385</td>\n      <td>9.675966</td>\n      <td>-0.227186</td>\n      <td>8.247914</td>\n      <td>7.836903</td>\n      <td>7.388989</td>\n      <td>9.702099</td>\n      <td>-0.039704</td>\n    </tr>\n    <tr>\n      <th>21</th>\n      <td>2019-06-01</td>\n      <td>15291.328500</td>\n      <td>9.635041</td>\n      <td>6.710568</td>\n      <td>8.026824</td>\n      <td>0.131574</td>\n      <td>0.288429</td>\n      <td>8.916509</td>\n      <td>8.886566</td>\n      <td>10.776203</td>\n      <td>...</td>\n      <td>-0.052819</td>\n      <td>6.021397</td>\n      <td>8.296108</td>\n      <td>9.769750</td>\n      <td>0.093785</td>\n      <td>8.340358</td>\n      <td>8.101902</td>\n      <td>7.960844</td>\n      <td>9.814525</td>\n      <td>0.112426</td>\n    </tr>\n    <tr>\n      <th>22</th>\n      <td>2019-09-01</td>\n      <td>15898.690600</td>\n      <td>9.673992</td>\n      <td>6.792549</td>\n      <td>8.049108</td>\n      <td>0.022284</td>\n      <td>-0.109290</td>\n      <td>9.028938</td>\n      <td>8.948516</td>\n      <td>10.792899</td>\n      <td>...</td>\n      <td>-0.016012</td>\n      <td>6.052049</td>\n      <td>8.320796</td>\n      <td>9.806156</td>\n      <td>0.036405</td>\n      <td>8.339365</td>\n      <td>8.205513</td>\n      <td>7.765238</td>\n      <td>9.364262</td>\n      <td>-0.450263</td>\n    </tr>\n    <tr>\n      <th>23</th>\n      <td>2019-12-01</td>\n      <td>17525.759000</td>\n      <td>9.771427</td>\n      <td>6.780160</td>\n      <td>8.034048</td>\n      <td>-0.015060</td>\n      <td>-0.037344</td>\n      <td>9.036131</td>\n      <td>8.831396</td>\n      <td>10.844187</td>\n      <td>...</td>\n      <td>0.016951</td>\n      <td>6.076667</td>\n      <td>8.421019</td>\n      <td>9.894765</td>\n      <td>0.088609</td>\n      <td>8.714331</td>\n      <td>8.340391</td>\n      <td>7.838552</td>\n      <td>10.209497</td>\n      <td>0.845234</td>\n    </tr>\n    <tr>\n      <th>24</th>\n      <td>2020-03-01</td>\n      <td>13118.619000</td>\n      <td>9.481788</td>\n      <td>6.261448</td>\n      <td>7.743447</td>\n      <td>-0.290600</td>\n      <td>-0.275540</td>\n      <td>8.747717</td>\n      <td>8.069321</td>\n      <td>10.316623</td>\n      <td>...</td>\n      <td>-0.063459</td>\n      <td>6.100694</td>\n      <td>8.063803</td>\n      <td>9.481710</td>\n      <td>-0.413054</td>\n      <td>8.308963</td>\n      <td>7.761259</td>\n      <td>7.205412</td>\n      <td>9.602376</td>\n      <td>-0.607121</td>\n    </tr>\n    <tr>\n      <th>25</th>\n      <td>2020-06-01</td>\n      <td>15924.495500</td>\n      <td>9.675614</td>\n      <td>6.771893</td>\n      <td>7.977153</td>\n      <td>0.233706</td>\n      <td>0.524306</td>\n      <td>9.040323</td>\n      <td>8.377218</td>\n      <td>10.833200</td>\n      <td>...</td>\n      <td>-0.059554</td>\n      <td>6.124157</td>\n      <td>8.376650</td>\n      <td>9.841165</td>\n      <td>0.359455</td>\n      <td>8.531676</td>\n      <td>8.234806</td>\n      <td>8.071109</td>\n      <td>9.984740</td>\n      <td>0.382365</td>\n    </tr>\n    <tr>\n      <th>26</th>\n      <td>2020-09-01</td>\n      <td>16666.081900</td>\n      <td>9.721131</td>\n      <td>6.856591</td>\n      <td>8.107328</td>\n      <td>0.130175</td>\n      <td>-0.103531</td>\n      <td>9.179623</td>\n      <td>8.719646</td>\n      <td>10.917506</td>\n      <td>...</td>\n      <td>0.042132</td>\n      <td>6.153309</td>\n      <td>8.391258</td>\n      <td>9.890580</td>\n      <td>0.049414</td>\n      <td>8.606465</td>\n      <td>8.187835</td>\n      <td>7.874804</td>\n      <td>10.040271</td>\n      <td>0.055531</td>\n    </tr>\n    <tr>\n      <th>27</th>\n      <td>2020-12-01</td>\n      <td>18979.867289</td>\n      <td>9.851134</td>\n      <td>6.859935</td>\n      <td>8.186771</td>\n      <td>0.079442</td>\n      <td>-0.050733</td>\n      <td>9.149858</td>\n      <td>8.722346</td>\n      <td>10.958312</td>\n      <td>...</td>\n      <td>0.038960</td>\n      <td>6.187652</td>\n      <td>8.523269</td>\n      <td>10.015731</td>\n      <td>0.125151</td>\n      <td>8.858408</td>\n      <td>8.465818</td>\n      <td>8.030338</td>\n      <td>10.159141</td>\n      <td>0.118870</td>\n    </tr>\n    <tr>\n      <th>28</th>\n      <td>2021-03-01</td>\n      <td>16273.314400</td>\n      <td>9.697282</td>\n      <td>6.660558</td>\n      <td>8.075925</td>\n      <td>-0.110846</td>\n      <td>-0.190288</td>\n      <td>9.061086</td>\n      <td>8.468740</td>\n      <td>10.632316</td>\n      <td>...</td>\n      <td>-0.008099</td>\n      <td>6.220854</td>\n      <td>8.388785</td>\n      <td>9.858825</td>\n      <td>-0.156906</td>\n      <td>8.651983</td>\n      <td>8.107396</td>\n      <td>7.863621</td>\n      <td>10.073365</td>\n      <td>-0.085776</td>\n    </tr>\n    <tr>\n      <th>29</th>\n      <td>2021-06-01</td>\n      <td>18137.491900</td>\n      <td>9.805736</td>\n      <td>6.890753</td>\n      <td>8.235599</td>\n      <td>0.159674</td>\n      <td>0.270520</td>\n      <td>9.265841</td>\n      <td>8.854006</td>\n      <td>10.961106</td>\n      <td>...</td>\n      <td>-0.013044</td>\n      <td>6.252989</td>\n      <td>8.551038</td>\n      <td>10.051520</td>\n      <td>0.192695</td>\n      <td>8.772798</td>\n      <td>8.342526</td>\n      <td>8.158456</td>\n      <td>10.298673</td>\n      <td>0.225308</td>\n    </tr>\n    <tr>\n      <th>30</th>\n      <td>2021-09-01</td>\n      <td>18238.748600</td>\n      <td>9.811304</td>\n      <td>6.956559</td>\n      <td>8.277158</td>\n      <td>0.041559</td>\n      <td>-0.118116</td>\n      <td>9.282531</td>\n      <td>8.704541</td>\n      <td>10.992627</td>\n      <td>...</td>\n      <td>0.027543</td>\n      <td>6.285659</td>\n      <td>8.547552</td>\n      <td>10.060004</td>\n      <td>0.008484</td>\n      <td>8.795129</td>\n      <td>8.321944</td>\n      <td>7.617351</td>\n      <td>10.252133</td>\n      <td>-0.046540</td>\n    </tr>\n    <tr>\n      <th>31</th>\n      <td>2021-12-01</td>\n      <td>20866.202800</td>\n      <td>9.945886</td>\n      <td>6.860005</td>\n      <td>8.378069</td>\n      <td>0.100911</td>\n      <td>0.059353</td>\n      <td>9.347508</td>\n      <td>8.480760</td>\n      <td>10.961281</td>\n      <td>...</td>\n      <td>0.027326</td>\n      <td>6.318780</td>\n      <td>8.644478</td>\n      <td>10.153752</td>\n      <td>0.093748</td>\n      <td>9.005747</td>\n      <td>8.465016</td>\n      <td>7.530357</td>\n      <td>10.330381</td>\n      <td>0.078248</td>\n    </tr>\n    <tr>\n      <th>32</th>\n      <td>2022-03-01</td>\n      <td>17886.386900</td>\n      <td>9.791795</td>\n      <td>6.719769</td>\n      <td>8.307953</td>\n      <td>-0.070117</td>\n      <td>-0.171028</td>\n      <td>9.283219</td>\n      <td>8.268384</td>\n      <td>10.698489</td>\n      <td>...</td>\n      <td>-0.007372</td>\n      <td>6.350839</td>\n      <td>8.578260</td>\n      <td>10.037280</td>\n      <td>-0.116472</td>\n      <td>8.783024</td>\n      <td>8.228220</td>\n      <td>7.394462</td>\n      <td>7.859645</td>\n      <td>-2.470736</td>\n    </tr>\n  </tbody>\n</table>\n<p>33 rows × 45 columns</p>\n</div>"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_new = df.iloc[:-1]\n",
    "df_new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:                      y   R-squared:                       0.939\n",
      "Model:                            OLS   Adj. R-squared:                  0.925\n",
      "Method:                 Least Squares   F-statistic:                     66.66\n",
      "Date:                Wed, 17 Aug 2022   Prob (F-statistic):           1.52e-14\n",
      "Time:                        18:37:32   Log-Likelihood:                 46.896\n",
      "No. Observations:                  33   AIC:                            -79.79\n",
      "Df Residuals:                      26   BIC:                            -69.32\n",
      "Df Model:                           6                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "Intercept      4.0731      0.840      4.846      0.000       2.345       5.801\n",
      "x1             0.3481      0.213      1.637      0.114      -0.089       0.785\n",
      "x44_diff       0.1622      0.126      1.288      0.209      -0.097       0.421\n",
      "x9_diff2       0.2047      1.574      0.130      0.898      -3.031       3.440\n",
      "x16_diff       0.1610      0.588      0.274      0.787      -1.049       1.370\n",
      "x17_diff       2.3673      0.787      3.008      0.006       0.749       3.985\n",
      "x18            0.5284      0.113      4.662      0.000       0.295       0.761\n",
      "==============================================================================\n",
      "Omnibus:                        3.473   Durbin-Watson:                   2.524\n",
      "Prob(Omnibus):                  0.176   Jarque-Bera (JB):                2.224\n",
      "Skew:                           0.598   Prob(JB):                        0.329\n",
      "Kurtosis:                       3.432   Cond. No.                     1.29e+03\n",
      "==============================================================================\n",
      "\n",
      "Notes:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n",
      "[2] The condition number is large, 1.29e+03. This might indicate that there are\n",
      "strong multicollinearity or other numerical problems.\n"
     ]
    }
   ],
   "source": [
    "results1 = smf.ols('y ~ x1+ x44_diff+ x9_diff2+x16_diff+ x17_diff+ x18', data=df_new).fit()\n",
    "print(results1.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0      8863.597780\n",
      "1      9221.354654\n",
      "2     10434.722533\n",
      "3     12265.756330\n",
      "4      9769.657552\n",
      "5     10131.829352\n",
      "6     11110.232710\n",
      "7     11678.291576\n",
      "8      9859.969988\n",
      "9     11569.225416\n",
      "10    11971.505531\n",
      "11    13403.510956\n",
      "12    11116.982779\n",
      "13    12603.237185\n",
      "14    13369.842046\n",
      "15    14812.777662\n",
      "16    12916.023428\n",
      "17    13765.190977\n",
      "18    14484.992395\n",
      "19    15334.711266\n",
      "20    13743.183777\n",
      "21    14818.578241\n",
      "22    15383.871256\n",
      "23    17660.186270\n",
      "24    12552.070844\n",
      "25    16408.781191\n",
      "26    18204.008542\n",
      "27    19892.007406\n",
      "28    16043.283694\n",
      "29    18173.778700\n",
      "30    19589.497636\n",
      "31    20097.120091\n",
      "32    17963.314326\n",
      "33    19430.524089\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "pt=results1.predict(df[['x1', 'x44_diff', 'x9_diff2','x16_diff' ,'x17_diff', 'x18']])\n",
    "arr=pt.values\n",
    "\n",
    "result = np.exp(pt)\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}